Interleave device, interleaving method, deinterleave device, and deinterleave method

ABSTRACT

An encoder  10  in a data transmission/reception system has a byte interleaver  12  for performing folding interleaving on encoded data ED in units of a byte and a packet interleaver  13  for performing folding interleaving, in units of a packet, on byte interleave data BID generated by this byte interleaver  12.  A decoder  20  has a packet de-interleaver  24  for performing folding de-interleaving, in units of a packet, on packet interleave data PID′ and a byte de-interleaver  25  for performing folding de-interleaving, in units of a byte, on byte interleave data BID′ generated by this packet de-interleaver  24.  It is thus possible to correct a significant burst error containing a packet loss even with an error correction code having a very small code length.

TECHNICAL FIELD

The present invention relates to an interleaving device, an interleavingmethod, a de-interleaving device and a de-interleaving method.

BACKGROUND ART

Recently, technologies have been developed for handling a video signaland/or an audio signal of a so-called high definition television (HDTV)such as a broadcast system formed by use of, for example, a broadcastingor business use video camera. In such a system, an apparatus referred toas a transcoder, which combines a function to compress and encodenon-compressed video and/or audio signals by using an image-compressingsystem such as moving picture experts group (MPEG)-2 etc. and a functionto decompress and decode these compressed and encoded video and/or audiosignals, is used. That is, this transcoder performs compression andencoding on the basis of such an image compression system as MPEG-2 byuse of a mounted encoder on non-compressed video and/or audio signalsinput through a serial bus etc. which conforms to, for example, the highdefinition-serial digital interface (HD-SDI) standards and transmitsthem as a transport stream comprised of plural transport packets (TSpackets). Further, the transcoder can decompress and decode, by using amounted decoder, a transport stream received through a predeterminedcommunication path, to reproduce non-compressed video and/or audiosignals.

As in the case of a transport stream transmitted and received by such atranscoder, in packet transmission in which predetermined data istransmitted and received with it being stored in a packet, a header isadded to each of the packets, so that an overhead can be made less aslarger size data is transferred with it being stored in one packet, thuseffectively improving in view of a communication efficiency.

Further, in packet transmission, data is transferred in accordance withthe Internet protocol (IP) often, so that packets are transmitted andreceived in accordance with a variety of transfer protocols that match adata format etc. Generally, packet communication based on the IP, as inthe case of the file transfer protocol (FTP), for example, oftenconforms to a transfer protocol capable of re-transmitting a packet inaccordance with a condition of the communication path. However, thepacket transmission has recently applied to a case of an application forreal-time communication in which. re-transmission of packet is notpermitted, for example, a real-time transport protocol (RTP) known as atransfer protocol for reproducing video and/or audio signals bystreaming. In this case, a transmission side, which transmits a packet,needs to have a powerful error correcting capability so that a receptionside can correct a significant burst error involving a packet loss bywhich a packet is lost due to an effect such as noise occurring on thecommunication path.

As such error-correcting technologies, it may be considered to add apredetermined error correction code such as a so-called Reed-Solomoncode to a packet.

The following will describe an example using a Reed-Solomon code as theerror correction code. By a Reed-Solomon code, if a 28-byte errorcorrection code is added to a packet comprised of, for example, 188bytes, error can be corrected completely when the number of bytescontaining an error in each packet is 14 or less. That is, aReed-Solomon code typically refers to an error correction code that canaccommodate only a random error. However, a Reed-Solomon code is notcapable of correcting errors if the number of bytes containing an errorin each packet is in excess of 14 bytes. Therefore, a Reed-Solomon codehas no effect on a significant burst error that contains a packet loss.

To cope with it, as the error-correcting technologies, typically, apredetermined error correction code such as a Reed-Solomon code is addedto a packet and then folding interleaving is performed on it, todisperse errors.

That is, in the packet communication, even if a burst error, which hasoccurred on a communication path, is superimposed on packets on which atransmission side has performed the folding interleaving, a receptionside can perform the corresponding folding de-interleaving on them tohandle each of them as a random error for each packet and decode anerror correction code such as a Reed-Solomon code, thereby correctingeven the burst error. For example, in the packet communication, iffolding interleaving with a depth of 18 is performed on packets eachcomprised of 216 bytes which is obtained by adding a 28-byte errorcorrection code to the above-mentioned 188-byte packet, even when one ofthe consecutive 18 packets has erred completely, the reception side maycorrect the error completely. Therefore, in the packet communication,especially when data is transmitted or received through a communicationpath subject to a packet loss, consecutive pieces of information of onepacket may be all lost; in such a case, by using such anerror-correcting technology, the lost packet can be restored completely.

In such a manner, in the packet communication, in a case where it isapplied to an application for real-time communication in whichre-transmission of packets is not permitted, the error correctingcapability for a burst error containing a packet loss can be improved byadding a predetermined error correction code to a packet and performingfolding interleaving on a packet thus obtained.

In the packet communication, again, to correct a significant burst errorcontaining a packet loss by using an error-correcting technology thatcombines the above-mentioned error correction code and foldinginterleaving, it is necessary to use an error correction code having avery large code length that matches a packet size.

However, in the packet communication, if an error correction code havinga large code length is added, a data overhead increases, therebydeteriorating communication efficiency. Further, in the packetcommunication, addition of such an error correction code with a largecode length brings about not only deterioration in communicationefficiency but also an increase in scale of circuits of an encoder and adecoder for an error correction code.

Therefore, in the packet communication, it is desirable to reduce thecode length of an error correction code as much as possible.

On the other hand, in the packet communication, if the error correctioncode length is reduced, a depth of folding interleaving must beincreased largely to correct a significant burst error containing apacket loss.

In terms of mounting of folding interleaving device, a depth of relevantfolding interleaving and a required memory capacity are proportional toeach other. Therefore, in the packet communication, to increase thedepth of folding interleaving, the required memory capacity increases,which is not desirable.

Further, in the folding interleaving, as the memory, it is necessary touse such a storage device as to be capable of accessing inconsecutiveaddresses for each clock of about one clock synchronized with each dataword in units of a byte in the case of, for example, the MPEG standard,that is, a dual-port random access memory (hereinafter abbreviated asDPRAM), which is capable of being random accessed.

In this case, as the folding interleaving, a dedicated integratedcircuit can be mounted; but, as viewed from a point of costs, handlingease, etc., effectively a general-purpose programmable device such as aso-called programmable logic device (PLD) or field programmable gatearray (FPGA) may be mounted. However, in the folding interleaving, sincea DPRAM provided in such a general-purpose programmable device has asmall capacity, it is difficult to obtain a sufficient depth necessaryto correct a significant burst error containing a packet loss bycompensating for a decrease in code length of an error correction code.Further, in the folding interleaving, if a problem is a memory capacityonly, the problem can be solved by using a general-purpose memory to beexternally mounted to a programmable logic device such as a synchronousdynamic random access memory (SDRAM); however, such an externallymounted device is surely effective in burst transfer of data in units ofplural data words but needs a period for inputting a command signal foraccess, so that time-wise consecutive random access of addresses inunits of a data word is difficult because it increases an overhead anddecreases a throughput and, to realize such access, very complicatedcircuits must be provided in a periphery of the memory, so that it isdifficult to mount them for the purpose of high-speed access in units ofa data word.

As described above, in the packet communication, to correct asignificant burst error containing a packet loss by using anerror-correcting technology that combines an error correction code andfolding interleaving, the error correction code must have a large codelength, thus resulting a problem such as a deterioration incommunication efficiency and an increase in circuit scale; if instead ofusing an error correction code having a small code length, foldinginterleaving with a large depth is realized, a program such as anincrease in memory capacity occurs.

DISCLOSURE OF THE INVENTION

In view of the above, the present invention has been developed, and itis an object of the present invention to provide an interleaving deviceand an interleaving method that can realize interleaving, which enablescorrecting a significant burst error containing a packet loss by usingan error correction code having a small code length on a transmissionside for performing packet communication, and a de-interleaving deviceand a de-interleaving method that can restore on a reception side anarray of data on which interleaving has been performed using theinterleaving device and method.

The object of the present invention is attained by providing aninterleaving device for outputting items of input data after rearrangingthem in terms of order according to a predetermined address, the devicecomprising: first interleaving means for performing folding interleavingon first data comprised of plural input packets, in units of a data wordor plural consecutive data words; and second interleaving means forperforming interleaving on second data comprised of plural packetsgenerated by the first interleaving means, in units of a packet.

It is also attained by providing an interleaving method for outputtingitems of input data after rearranging them in terms of order accordingto a predetermined address, the method comprising: a first interleavingstep of performing folding interleaving on first data comprised ofplural input packets, in units of a data word or plural consecutive datawords; and a second interleaving step of performing interleaving, inunits of a packet, on second data comprised of plural packets generatedby the first interleaving step.

It is further attained by providing a de-interleaving device foroutputting items of input data after rearranging them in terms of orderaccording to a predetermined address in such a manner as to restore toan original data array a data array rearranged by using an interleavingdevice comprising first interleaving means for performing foldinginterleaving on first data comprised of plural input packets, in unitsof a data word or plural consecutive data words and second interleavingmeans for performing interleaving on second data comprised of pluralpackets generated by the first interleaving means, in units of a packet,the de-interleaving device comprising first de-interleaving means forperforming de-interleaving, in units of a packet, on third datacomprised of plural input packets, in such a manner as to restore anorder of packets of data on which interleaving is performed by thesecond interleaving means to an order of the packets of the second dataand second de-interleaving means for performing folding de-interleaving,in units of a data word or plural consecutive data words, on fourth datacomprised of plural packets generated by the first de-interleavingmeans, in such a manner as to restore an order of the packets of thesecond data on which interleaving is performed by the first interleavingdevice to an order of the packets of the first data.

It is additionally attained by providing a de-interleaving method foroutputting items of input data after rearranging them in terms of orderaccording to a predetermined address in such a manner as to restore toan original data array a data array rearranged by using an interleavingmethod comprising a first interleaving step of performing foldinginterleaving on first data comprised of plural of input packets, inunits of a data word or plural of consecutive data words and a secondinterleaving step of performing interleaving, in units of a packet, onsecond data comprised of plural packets generated by the firstinterleaving step, the de-interleaving method comprising a firstde-interleaving step of performing de-interleaving, in units of apacket, on third data comprised of plural input packets, in such amanner as to restore an order of packets of data on which interleavingis performed in the second interleaving step to an order of the packetsof the second data and a second de-interleaving step of performingfolding de-interleaving, in units of a data word or plural consecutivedata words, on fourth data comprised of plural packets generated in thefirst de-interleaving step, in such a manner as to restore an order ofthe packets of the second data on which interleaving is performed in thefirst interleaving step to an order of the packets of the first data.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a block diagram for showing a configuration of a datatransmission/reception system;

FIGS. 2A and 2B are diagrams each for explaining processing by aReed-Solomon-encoding portion in an encoder of the datatransmission/reception system;

FIGS. 3A and 3B are diagrams each for explaining interleaving processingperformed in units of a byte by a byte interleaver of the encoder;

FIGS. 4A and 4B are diagrams each for explaining interleaving processingperformed in units of plural consecutive bytes by the byte interleaverof the encoder;

FIGS. 5A and 5B are diagrams each for explaining folding interleavingprocessing performed in units of a packet by a packet interleaver of theencoder;

FIGS. 6A and 6B are diagrams each for explaining block interleavingprocessing performed in units of a packet by the packet interleaver ofthe encoder;

FIGS. 7A-7D are diagrams each for specifically explaining transition ofdata contents in portions in the encoder in a case where foldinginterleaving processing is performed in units of a packet by the packetinterleaver;

FIGS. 8A-8E are diagrams each for specifically explaining transition ofthe data contents in the portions in the encoder in a case where blockinterleaving processing is performed in units of a packet by the packetinterleaver;

FIGS. 9A-9F are diagrams each for explaining transition of a packetformat in the portions in the encoder in a case where foldinginterleaving processing is performed in units of a packet by the packetinterleaver;

FIGS. 10A-10E are diagrams each for explaining transition of the packetformat in the portions in the encoder in a case where block interleavingprocessing is performed in units of a packet by the packet interleaver;

FIGS. 11A-11E are diagrams each for explaining transition of the packetformat in the portions in a decoder in a case where folding interleavingprocessing is performed in units of a packet by the packet interleaver;

FIGS. 12A-12F are diagrams each for explaining transition of the packetformat in the portions in the decoder in a case where block interleavingprocessing is performed in units of a packet by the packet interleaver;

FIGS. 13A-13D are diagrams each for explaining a count value whenprocessing is performed in units of a byte by the byte interleaver;

FIGS. 14A-14D are diagrams each for explaining data write and readoperations performed to a DPRAM in the processing by the byteinterleaver;

FIG. 15 is a diagram for showing ones example of a data mappingcondition in the DPRAM provided in the byte interleaver;

FIGS. 16A-16D are diagrams each for explaining a count value whenprocessing is performed in units of a byte by a byte de-interleaver;

FIGS. 17A-17D are diagrams each for explaining data write and readoperations performed to the DPRAM in the processing by the bytede-interleaver;

FIG. 18 is a diagram for showing one example of a data mapping conditionin the DPRAM provided in the byte de-interleaver;

FIGS. 19A-19E are diagrams each for explaining a count value whenprocessing is performed by the byte interleaver in units of pluralconsecutive bytes;

FIG. 20 is a diagram for showing a condition where data is mapped toaddresses in the DPRAM provided to the byte interleaver;

FIGS. 21A-21E are diagrams each for explaining a count value whenprocessing is performed by the byte de-interleaver in units of pluralconsecutive bytes;

FIG. 22 is a diagram for showing a condition where data is mapped toaddresses in the DPRAM provided to the byte de-interleaver;

FIG. 23 is a flowchart for showing an operation of generating a writeaddress used to write data to the DPRAM; and

FIG. 24 is a flowchart for showing an operation of generating a readaddress used to read data from the DPRAM.

BEST MADE FOR CARRYING OUT THE INVENTION

The following will describe in more detail the present invention withreference to appended drawings.

In this best mode, a data transmission/reception system comprises anencoder for receiving packeted data, adding a predetermined errorcorrection code to each of the packets, performing interleaving on them,and outputting them, and a decoder for decoding incoming data receivedfrom this encoder through a predetermined communication path. In thisdata transmission/reception system, the encoder performs, as theinterleaving, folding interleaving in units of a data word or pluralconsecutive data words and interleaving in units of a packet, to enablea significant burst error containing a packet loss to be corrected usingan error correction code having a small code length. In the datatransmission/reception system, the decoder, on the other hand, decodesincoming data transmitted as encoded by such an encoder and received viaa predetermined communication path, thus completely correcting asignificant burst error containing a packet loss.

Especially, in the data transmission/reception system, in realization offolding interleaving and folding de-interleaving, in units of a dataword or plural consecutive data words, in contrast to a typical casewhere such a memory is mounted as to have a capacity for data words asmany as a number equal to a product of a depth of the foldinginterleaving plus that of the folding de-interleaving and the number ofdata words per packet, the present invention can realize the similarfolding interleaving and folding de-interleaving by using a memoryhaving a much smaller capacity than that.

The following description is made on the assumption that in the datatransmission/reception system, the encoder receives plural transportpackets (TS packets) that constitutes a transport stream obtained byperforming compression and encoding on the basis of the so-called MEPG-2standard on non-compressed video and/or audio signals input through aserial bus etc. which conforms to, for example, the highdefinition-serial digital interface (HD-SDI) standards, and as an errorcorrection code to be added by this encoder to the transport packet, aso-called Reed-Solomon code is used.

As shown in FIG. 1, for example, a data transmission/reception systemcomprises an encoder 10 for receiving a transport stream TS comprised ofplural transport packets TSP and encoding it, and a decoder 20 fordecoding receive data RD received from this encoder 10 through apredetermined communication path and restoring the transport stream TS.

First, the encoder 10 is described. As shown in FIG. 1, for example, theencoder 10 has: a Reed-Solomon-encoding portion 11 for performingReed-Solomon encoding on each of the transport packets TSP whichconstitute the transport stream TS; a byte interleaver 12 for performingfolding interleaving, in units of a byte or plural consecutive bytes, onencoded data ED comprised of plural encoded packets EP to each of whichan error correction code is added by this Reed-Solomon encoder 11; apacket interleaver 13 for performing interleaving, in units of a packet,on byte interleave data BID comprised of plural byte interleave packetsBIP on which this byte interleaver 12 performs folding interleaving; apacketing portion 14 for generating one item of packet data PD bylinking to each other predetermined numbers of packet-unit interleavepackets PIP of packet interleave data PID comprised of the pluralpacket-unit interleave packets PIP on which the packet interleaver 13performs interleaving in units of a packet; and a transmission portion15 for adding a predetermined header to each packet data PD generated bythe packeting portion 14 and transmitting it as transmit data TDcomprised of plural upper-layer packets.

In the encoder 10, of these portions, at least the Reed-Solomon-encodingportion 11, the byte interleaver 12, an interface portion 17 in thepacket interleaver 13, and the packeting portion 14, which are enclosedby a broken line in FIG. 1, are mounted in a form of a programmabledevice such as a programmable logic device (PLD) or a field programmablegate array (FPGA).

The Reed-Solomon-encoding portion 11 performs Reed-Solomon encoding oneach of the transport packets TSP which constitute a transport stream TSinput as an information sequence, to generate encoded data ED comprisedof plural encoded packets EP. Specifically, Reed-Solomon-encodingportion 11 adds an error correction code (ECC) comprised of 28 bytes asa parity, as shown in FIG. 2B, to each of the transport packets TSP of atransport stream TS, each of which is comprised of 188 bytes as shown inFIG. 2A, to generate encoded data ED comprised of encoded packets EPeach of which has a code length of 216 bytes per packet. Note here thatbeginning data of each of the encoded packets EP consists of a sink bytein a packet header of the transport packet TSP according to the MPEG-2standard and has a value of “0×47”. The Reed-Solomon-encoding portion 11supplies the byte interleaver 12 on its downstream side with encodeddata ED comprised of the generated plural encoded packets EP. Note herethat an error correction capability, if this encoded data ED is outputas it is, is enough to completely correct an error of up to 14 bytes foreach encoded packet EP.

The byte interleaver 12 performs folding interleaving havingpredetermined depth and period on each of the encoded packets EP of theencoded data ED supplied from the Reed-Solomon-encoding portion 11, inunits of a data word or plural consecutive data words, that is, in unitsof a byte or plural consecutive bytes because the MPEG standard isemployed, to rearrange the bytes of each of the encoded packets EP interms of order, thereby generating a byte interleave data BID comprisedof plural byte interleave packets BIP. Specifically, although not shown,the byte interleaver 12 is comprised of a dual-port random access memory(hereinafter abbreviated as DPRAM) capable of accessing inconsecutiveaddresses for each clock synchronized with a byte for each of the bytes,an address generation portion for performing data write and readoperations to this DPRAM, etc. The byte interleaver 12 sequentiallytransfers items of input encoded data ED to the DPRAM in accordance witha predetermined write address and writes them to it, and sequentiallyreads the data thus written to this DPRAM in accordance with apredetermined read address that is different from the write address,thereby performing, for example, folding interleaving with a depth of 18and a period of 12 in units of a byte or folding interleaving with adepth of 18 and a period of 3 in units of consecutive four bytes as oneprocessing unit on the encoded data ED generated by theReed-Solomon-encoding portion 11.

Note here that a depth of folding interleaving indicates such anumerical value that in a case where interleaving is performed in unitsof a byte, packets as many as a first number of bytes are divided intogroups as many as a second number of bytes which is smaller than thefirst number of bytes, to disperse each of the bytes 1 of a divided unitcomprised of this second number of bytes into mutually different dividedunits; and a period indicates a separation quantity for divided unit, bywhich the adjacent bytes are dispersed and is represented as a quotientobtained by dividing the first number of bytes by a depth of foldinginterleaving. Further, a depth of folding interleaving indicates such anumerical value that that in a case where interleaving is performed inunits of plural consecutive bytes, packets as many as a first number ofbytes are divided into groups as many as a second number of bytes, whichis smaller than the first number of bytes, to disperse it to mutuallydifferent divided units in units of plural consecutive bytes(hereinafter referred to as “unit”) of divided units comprised of thissecond number of bytes; and a period indicates a separation quantity ofdivided unit, by which the adjacent units are dispersed and isrepresented as a quotient obtained by dividing a quotient obtained bydividing the first number of bytes by a depth of folding interleavingfurther by the unit.

That is, in a case where interleaving is performed in units of a byte,the byte interleaver 12, as shows in FIG. 3A, divides one encoded packetEP comprised of 216 bytes by 18 bytes into twelve divided units and, asshown in FIG. 3B, performs such folding interleaving with a depth of 18and a period of 12 as to avoid rearranging the first byte of the firstdivided unit (at this moment, the first byte is placed to a positiondelayed by one byte), place the following second byte to a positiondelayed by (18×12×1−1) bytes, that is, rearrange it so that it may bepositioned to the second byte of the second packet, and place thefollowing third byte to a position delayed by (18×12×2−1) bytes, thatis, rearrange it so that it may be positioned to the third byte of thethird packet; thereby generating byte interleave data BID comprised ofplural byte interleave packets BIP. Therefore, because of foldinginterleaving being performed by the byte interleaver 12, informationcontained in one encoded packet EP is dispersed by 12-byte intoconsecutive eighteen byte interleave packets BIP.

Further, in a case where interleaving is performed in units of a unitassuming the one unit is comprised of consecutive four bytes because theheader of a transport stream TS is comprised of four bytes, the byteinterleaver 12, as shows in FIG. 4A, divides one encoded packet EPcomprised of 216 bytes by (4×18=72) bytes into three divided units and,as shown in FIG. 4B, performs such folding interleaving with a depth of18 and a period of 3 as to avoid rearranging the first unit thatconstitutes the first divided unit (at this moment, the first byte ofthe one unit that constitutes the first divided unit is places to aposition delayed by one byte), place the following second unit to aposition delayed by (72×3×1−1) bytes, that is, rearrange it so that itmay be positioned to the second unit of the second packet, and place thefollowing third unit to a position delayed by (72×3×2−1) bytes, that is,rearrange it so that it may be positioned to the third unit of the thirdpacket, thereby generating byte interleave data BID comprised of pluralbyte interleave packets BIP. Therefore, because of folding interleavingbeing performed by the byte interleaver 12, information contained in oneencoded packet EP is dispersed by 12-byte into consecutive eighteen byteinterleave packets BIP for each unit.

Although this does not cause the byte interleaver 12 to improve theerror correction capability of the Reed-Solomon-encoding portion 11, theinformation can be dispersed in arrangement to transform a burst errorcontaining a packet loss into a random error. Specifically, by an errorcorrection capability in a case where byte interleave data BID is outputas it is, even if one packet for each consecutive eighteen byteinterleave packets BIP, that is, 216 bytes are completely erroneous, allthe bits can be corrected. Note here that beginning data of each of thebyte interleave packets BIP is the same as that of the encoded packet EPand constitutes a sink byte in the packet header of a transport packetTSP according to the MPEG-2 standard, having a value of “0×47”. The byteinterleaver 12 supplies its downstream-side packet interleaver 13 withbyte interleave data BID comprised of plural byte interleave packets BIPthus generated.

Note here that this byte interleaver 12 can control addresses inaccordance with a predetermined address generation system to reduce acapacity of a memory, that is, the DPRAM, necessary to perform foldinginterleaving in units of a byte or a unit, which will be describedlater.

The packet interleaver 13 performs interleaving with predetermined depthand period in units of a packet on each of the byte interleave packetsBIP that constitute byte interleave data BID supplied from the byteinterleaver 12 and rearranges the byte interleave packets BIP in termsof order, thereby generating packet interleave data PID comprised ofplural packet-unit interleave packets PIP. Specifically, the packetinterleaver 13 comprises a synchronous dynamic random access memory(SDRAM) 16 externally attached to each of the portions mounted in a formof a programmable device in order to burst-transfer data in units ofplural bytes, and the interface portion 17 for performing processingsuch as address generation and data transmission/reception in order toperform data write and read operations to this SDRAM 16. The packetinterleaver 13 sequentially transfers and writes items of the byteinterleave data BID input to the interface portion 17, to the SDRAM 16in accordance with a predetermined write address and sequentially readsthe items of data written to this SDRAM 16 in accordance with apredetermined read address that is different from the write address,thereby performing folding interleaving with a depth of 6 and a periodof 4 in units of byte interleave packets on byte interleave data BIDsupplied from the byte interleaver 12 or block interleaving with a depthof 6 that is completed with consecutive 108 packets of a byte interleavepacket BIP.

That is, in a case where folding interleaving is performed, the packetinterleaver 13, as shown in FIG. 5A, regards consecutive 24 byteinterleave packets BIP as one packet (hereinafter referred to astemporary composite packet CPT) and, as shown in FIG. 5B, performs suchfolding interleaving as to avoid rearranging the first byte interleavepacket BIP that constitutes a divided unit comprised of the first sixbyte interleave packets BIP in certain one temporary composite packetCPT, place the following second byte interleave packet BIP to a positiondelayed by (6×4×1−1) packets, that is, rearrange it so that it may bepositioned to the second packet in the second temporary composite packetCPT, and place the following third byte interleave packet BIP to aposition delayed by (6×4×2−1) packets, that is, rearrange it so that itmay be positioned to the third packet in the third temporary compositepacket CPT, thereby generating packet interleave data PID comprised ofplural packet-unit interleave packets PIP. Therefore, because of foldinginterleaving being performed by the byte packet interleaver 13,information contained in one encoded packet EP is sporadically dispersedinto consecutive 6×4(=24)×6=144 packet-unit interleave packets PIP insuch a condition that the information is dispersed by 12 bytes with aspacing of at least six packet-unit interleave packets PIP therebetween.In this case, the SDRAM 16 that constitutes the packet interleaver 13only needs to have a capacity to store at least 144 packet-unitinterleave packets PIP.

Further, in a case where block interleaving is performed, the packetinterleaver 13, as shown in FIG. 6A, regards consecutive 108 byteinterleave packets BIP as one temporary composite packet CPT, dividesthis temporary composite packet CPT by 18 byte interleave packets intosix groups, and, as shown in FIG. 6B, avoids rearranging the first byteinterleave packet BIP of the byte interleave packets that constitute thefirst group and rearranges the following second through 18'th byteinterleave packets BIP sequentially to positions each delayed by sixbyte interleave packets. The first byte interleave packet BIP in thebyte interleave packets that constitute the second group is rearrangedto a position next to the position of the first byte interleave packetBIP in the first group. Further, the second through 18th byte interleavepackets BIP are rearranged sequentially to positions each delayed by sixbyte interleave packets. Similarly, such block interleaving is performedthat the first byte interleave packet BIP of the byte interleave packetsthat constitute the sixth group may be rearranged to a position next tothe position of the sixth byte interleave packet BIP in the first groupand the second through 18'th byte interleave packets BIP may berearranged sequentially to positions each delayed by six byte interleavepackets, thereby generating packet interleave data PID comprised ofplural packet-unit interleave packets PIP. Therefore, because of blockinterleaving being performed by the byte packet interleaver 13,information contained in one encoded packet EP is sporadically dispersedinto consecutive 108 packet-unit interleave packets PIP on which blockinterleaving has been performed, and if the packet interleave data PIDis divided into groups each having consecutive six packet-unitinterleave packets, information is dispersed by 12 bytes into thesegroups in a one-to-one relationship. In this case, the SDRAM 16 thatconstitutes the packet interleaver 13 only needs to have a capacity tostore at least 216 packet-unit interleave packets PIP.

Although, as in the case of the byte interleaver 12, this does not causethe packet interleaver 13 to improve the error correction capability ofthe Reed-Solomon-encoding portion 11, the information can be dispersedin arrangement more than that by the byte interleaver 12, to transform alarger burst error containing a packet loss into a random error.Specifically, by an error correction capability in a case where packetinterleave data PID generated by folding interleaving is output as itis, even if up to consecutive six packet-unit interleave packets PIP ofthe consecutive 144 packet-unit interleave packets PIP, that is, 1296bytes are completely erroneous, all the bits can be corrected. Further,by an error correction capability in a case where packet interleave dataPID generated by block interleaving is output as it is, even if up toconsecutive six packet-unit interleave packets PIP of the consecutive108 packet-unit interleave packets PIP, that is, 1296 bytes arecompletely erroneous, all the bits can be corrected. Furthermore, incontrast to the case of employing folding interleaving where errors ofup to six packet-unit interleave packets PIP of the consecutive 144packet-unit interleave packets PIP can be corrected, in the case ofemploying block interleaving, errors of up to six packet-unit interleavepackets PIP of the consecutive 108 packet-unit interleave packets PIPcan be corrected, thus improving the error correction capability.

Note here that a beginning packet in packet interleave data PID on whichinterleaving is thus performed by the packet interleaver 13 cannot beknown as it is by a reception side, so that synchronization is difficultto perform. Therefore, to notify the reception side of the beginningpacket in the packet interleave data PID, the packet interleaver 13exchanges a value of a sink byte which is beginning data of a firstpacket-unit interleave packet PIP. That is, when folding interleavingwith a depth of 6 is performed by the packet interleaver 13, it invertsthe beginning data of a packet-unit interleave packet PIP for each sixpacket to replace “0×47” with “0×B8”, thereby generating packetinterleave data PID to be output finally.

Further, when block interleaving is performed, to notify the receptionside of a beginning packet in an interleave block comprised of, forexample, consecutive 108 packet-unit interleave packets PIP, the valueof a sink byte which is the beginning data of the first packet-unitinterleave packet PIP in the interleave block is changed from “0×47” to,for example, “0×B7”. Furthermore, for the remaining packet-unitinterleave packets PIP, by inverting the value of the sink byte for eachsix packet-unit interleave packets PIP to replace “0×47” with “0×B8”, itis possible for the reception side to detect “0×B8” and therebysynchronize de-interleaving processing beforehand, thus rapidlyobtaining an output after the block de-interleaving processing isperformed when “0×B7” is detected.

The packet interleaver 13 supplies its down-stream side packetingportion 14 with the packet interleave data PID comprised of pluralpacket-unit interleave packets PIP thus generated.

The packeting portion 14 links to each other predetermined numbers ofpacket-unit interleave packets PIP that constitute the packet interleavedata PID supplied from the packet interleaver 13 to generate one item ofpacket data PD. Specifically, to transfer a video signal and/or an audiosignal in accordance with real-time transport protocol (RTP) known as atransfer protocol for streaming reproduction, the packeting portion 14links one after another the consecutive six packet-unit interleavepackets PIP of a sequence of packet-unit interleave packets PIP andstore them as an upper layer in one packet of the RTP, therebygenerating packet data PD. Further, if packet interleave data PID isgenerated after block interleaving is performed on it, an RTP packet isgenerated starting from a position that indicates the beginning of aninterleave block, that is, a position where the sink byte has a value of“0×B7”. By linking the six packet-unit interleave packets PIP one afteranother and storing them as the upper layer in one packet of the RTP,the packet data PD is generated. Note here that if the sink byte valueis changed from “0×47” to “0×B8”, these values “0×B7” and “0×B8” can bedetected to thereby easily generate packet data PD obtained by linkingthe six packet-unit interleave packets PID one after another.

In this case, the six packet-unit interleave packets PIP linked oneafter another as this packet data PD contains each 12 bytes ofinformation of 18×6=108 encoded packets EP. FIGS. 7A-7D explaintransition of generation of packet data PD in a case where foldinginterleaving is performed in units of bytes (or units) by the byteinterleaver 12. If orders of encoded packets EP are indicated as . . . ,100, 101, . . . , 136, . . . as shown in FIG. 7A, the encoder 10disperses information contained in one of the encoded packet EP intoconsecutive 18 byte interleave packets BIP each having 12 bytes as shownin FIG. 7B. Furthermore, the encoder 10 aggregates one column ofinformation in FIG. 7C to generate one packet-unit interleave packetPIP. Then, the encoder 10 uses the packeting portion 14 to linkarbitrary consecutive six packet-unit interleave packets PIP one afteranother, thereby generating one item of packet data PD as shown in FIG.7D. Therefore, each of the items of packet data PD contains each 12bytes of information of 18×6=108 encoded packets EP as described above.

FIGS. 8A-8E explain transition of generation of packet data PD in a casewhere folding interleaving is performed in units of a unit (or byte) bythe byte interleaver 12 and block interleaving is performed by thepacket interleaver 13. If orders of encoded packets EP are indicated as. . . , 100, 101, . . . , 136, . . . as shown in FIG. 8A, the encoder 10disperses information contained in one of the encoded packets EP by 12bytes into consecutive 18 byte interleave packets BIP, as shown in FIG.8B. Furthermore, the encoder 10 aggregates one column of information inFIG. 8C to generate one packet-unit interleave packet PIP. Then, theencoder 10 uses the packeting portion 14 to link one after anotherarbitrary consecutive six packet-unit interleave packets PIP startingfrom the beginning packet-unit interleave packet PIP in the interleaveblock, thereby generating one item of packet data PD as shown in FIG.8D. Therefore, each of the items of packet data PD contains each 12bytes of information of 18×6=108 encoded packets EP as described above.

Such packet data PD has no overlapping numbers as shown in FIGS. 7D and8D; that is, it is comprised of information from the mutually different108 encoded packets EP. This is because, if the same number is presentat two locations in one item of packet data PD, for example, as shown inFIG. 8E when the packet data PD is generated, a number 155 is present attwo locations in a condition where six packet-unit interleave packetsPIP to be linked one after another each having a phase difference of thefour packet-unit interleave packets PIP with respect to those of FIG.8D, each encoded packet EP contains 24 bytes of information, so that if,for example, one upper layer packet ULP is lost on the communicationpath, such a condition occurs that an encoded packet EP′ having errordata quantity that cannot be accommodated even by a maximum errorcorrection capability of the decoder 20 may be generated, thereby makingit impossible to completely correct errors.

Therefore, the packeting portion 14 generates packet data PD by linkingone after another consecutive six packet-unit interleave packets PIP ofa sequence of packet-unit interleave packets PIP in such a manner thatinformation from the same encoded packet EP may not be contained. Notehere that in a case where folding interleaving is performed by thepacket interleaver 13, the packeting portion 14 may link arbitrary sixconsecutive packet-unit interleave packets PIP one after anotherirrespective of the position of a sink byte whose value has beeninverted by the packet interleaver 13. However, in a case where blockinterleaving is performed by the packet interleaver 13, the packetingportion 14 links one after another consecutive six packet-unitinterleave packets PIP starting from a position of a sink byte thatindicates the beginning of an interleave block. The packeting portion 14supplies the generated packet data PD to its downstream-sidetransmission portion 15.

The transmission portion 15, to transmit packet data PD supplied fromthe packeting portion 14 in accordance with the RTP and the transmissioncontrol protocol/Internet protocol (TCP/IP) using the so-called userdatagram protocol (UDP) as a transport layer protocol, adds anRTP/UDP/IP packet header to each of the items of packet data PD togenerate one upper layer packet ULP and transmits it as transmit data TDcomprised of plural upper layer packets ULP. Further, the transmissionportion 15, to generate an RTP packet, sets a sequence No. to the RTPheader. Thus, by setting a sequence No., the reception side can verifyconsecutiveness of the sequence Nos. to detect a loss of packets asdescribed later.

The encoder 10 having these portions outputs a transport stream TS inputto it as an information series, as transmit data TD. FIGS. 9A-9F showtransition of a packet format in the encoder 10 in a case where foldinginterleaving is performed by the packet interleaver 13. Further, FIGS.10A-10E show transition of the packet format in the encoder 10 in a casewhere block interleaving is performed by the packet interleaver 13.

That is, when a transport stream TS comprised of plural transportpackets TSP shown in FIG. 9A (or FIG. 10A) is input, the encoder 10performs Reed-Solomon encoding on each of these transport packets TSP byusing the Reed-Solomon-encoding portion 11, to generate encoded data EDcomprised of plural encoded packets EP shown in FIG. 9B (or FIG. 10B).With this, of course, a quantity of information contained in one encodedpacket EP indicated by a solid grid in FIG. 9B (or FIG. 10B), moreprecisely, the information quantity of the encoded packet EP except foran added error correcting code is the same as that of the transportpacket TSP as indicated by the solid grid in FIG. 9A (or FIG. 10B) evenif Reed-Solomon encoding is performed on the transport packet TSP by theReed-Solomon-encoding portion 11 and an order of a series of the encodedpackets EP is also the same as that of a series of the transport packetsTSP.

Then, as shown in FIG. 9C (or 10C), the encoder 10 performs foldinginterleaving in units of a byte or a unit on each of the encoded packetsEP by using the byte interleaver 12, to generate byte interleave dataBID comprised of plural byte interleave packets BIP in which informationcontained in one encoded packet EP indicated by a solid grid in FIG. 9B(or FIG. 10B) are dispersed by 12 bytes, for each byte or unit, intoconsecutive eighteen interleave packets BIP as indicated by a hatchedportion shown in FIG. 9C (or FIG. 10C). Note here that the hatchedportions in FIGS. 9C (or 10C) and FIG. 9D (or FIG. 10D) show a conditionwhere information of one encoded packet EP indicated by the solid gridin FIG. 9B (or FIG. 10B) is dispersed into consecutive eighteen byteinterleave packets BIP.

Then, the encoder 10 performs folding interleaving with a depth of 6 anda period of 4 on each of the byte interleave packets BIP in units of abyte interleave packets, to generate packet interleave data PIDcomprised of plural packet-unit interleave packets PIP in whichinformation of 24 byte interleave packets BIP as shown in FIG. 9D issporadically dispersed into consecutive 144 packet-unit interleavepackets PIP as shown in FIG. 9E and information of 12 bytes is dispersedwith a spacing of at least six packet-unit interleave packets PIPtherebetween. Therefore, the information contained in one encoded packetEP indicated by the solid grid in FIG. 9B is dispersed as indicated bythe hatched portion in FIG. 9E.

Further, the encoder 10 performs block interleaving with a depth of 6that is completed with consecutive 108 packets of a byte interleavepacket BIP on each of the byte interleave packets BIP, to generatepacket interleave data PID in which information of 18 byte interleavepackets BIP as shown in FIG. 10C is sporadically dispersed intoconsecutive 108 packet-unit interleave packets PIP as shown in FIG. 10Dand information of 12 bytes is dispersed into groups each havingconsecutive six packet-unit interleave packets PIP starting from thebeginning of an interleave block in a one-to-one relationship.Therefore, information contained in one encoded packet EP indicated bythe solid grid in FIG. 10B is dispersed as indicated by the hatchedportions in FIG. 10D.

Then, as shown in FIG. 9F (or FIG. 10E), the encoder 10 links one afteranother consecutive six packet-unit interleave packets PIP by using thepacketing portion 14 to generate the packet data PD and, by using thetransmission portion 15, adds an RTP/UDP/IP packet header to each of theitems of packet data PD to transmit it as transmit data TD comprised ofplural upper layer packets ULP.

Thus, by performing folding interleaving in units of a byte or a unit onthe encoded packets EP to each of which a Reed-Solomon code is added andinterleaving in units of a packet, the encoder 10 can send transmit dataTD that has an error correction capability which enables correcting asignificant burst error containing a packet loss by using a Reed-Solomoncode having a small code length. That is, even if a burst error hasoccurred in information contained in up to one upper layer packet ULPsuch as a case where one upper layer packet ULP is lost on thecommunication path, the encoder 10 can send transmit data TD that has anerror correction capability which enables completely correcting a bursterror containing this packet loss by using the decoder 20.

Further, to perform interleaving in units of a packet, the encoder 10can replace a value of a sink byte which is beginning data of a firstpacket-unit interleave packet PIP by utilizing a fact that the beginningdata of the packet has a fixed value, to notify the reception side of abeginning packet in the packet interleave data PID or a beginning packetin an interleave block when block interleaving is performed.

Furthermore, the encoder 10 can install the byte interleaver 12 bymounting the built-in DPRAM having a relatively small capacity into aprogrammable device and the packet interleaver 13 by mounting the SDRAM16 having a relatively large capacity externally to the programmabledevice, thereby saving on memory resources provided in the programmabledevice and simplifying peripheral circuits due to burst access to theSDRAM 16. Thus, by performing two-stage interleaving by use of the DPRAMand the SDRAM 16, the encoder 10 can complementarily avoid disadvantagesof these memories and, when performing interleaving in units of apacket, use the externally mounted SDRAM 16 instead of thesmall-capacity DPRAM incorporated in the programmable device, therebyreducing the costs and performing high-speed operations by accessing theSDRAM 16 in units of a packet.

Transmit data TD sent by such an encoder 10 propagates through apredetermined communication path and is received by the decoder 20 asreceive data RD comprised of plural upper layer packets ULP.

The following will describe the decoder 20 in a datatransmission/reception system.

As shown in FIG. 1 for example, the decoder 20 has a reception portion21 for receiving and analyzing receive data RD comprised of plural upperlayer packets ULP′, a packet consecutiveness verification portion 22 forverifying consecutiveness of upper layer packets ULP′ on the basis of aheader added to the receive data RD received by this reception portion21, an un-packeting portion 23 for dividing packet data PD′ from whichthe header is removed when they are received by the reception portion21, into packet-unit interleave packets PIP; a packet de-interleaver 24for performing de-interleaving on the packet interleave data PID′ inunits of a packet in such a manner as to restore an order of theplurality packet-unit interleave packets PIP′ divided by thisun-packeting portion 23 to an order of byte interleave packets BIP thatconstitute original byte interleave data BID, a byte de-interleaver 25for performing folding de-interleaving on the byte interleave data BID′in such a manner as to restore an order of the plural byte interleavepackets BIP′ on which de-interleaving is performed by this packetde-interleaver 24 to an order of the encoded packets EP that constitutethe original encoded data ED, and a Reed-Solomon-decoding portion 26 fordecoding a Reed-Solomon code of each of the encoded packets EP′ of theencoded data ED′ on which folding de-interleaving is performed by thisbyte de-interleaver 25, to output a transport stream TS comprised ofplural transport packets TSP.

In the decoder 20, of these portions, at least the packetconsecutiveness verification portion 22, the un-packeting portion 23, aninterface portion 28 in the packet de-interleaver 24, the bytede-interleaver 25, and the Reed-Solomon-decoding portion 26 which areenclosed by a broken line in the figure are mounted as a programmabledevice such as a PLD or an FPGA.

The reception portion 21 is provided corresponding to the transmissionportion 15 in the decoder 10; when having received the receive data RDthrough a predetermined communication path, it analyzes an RTP/UDP/IPpacket header added to each of the plural upper layer packets ULP′ thatconstitute this receive data RD. Specifically, the reception portion 21analyzes a sequence No. of an RTP in the RTP/UDP/IP packet header. Thereception portion 21 supplies the packet consecutiveness verificationportion 22 with analyzed information AN that indicates the sequence No.of the analyzed RTP and also supplies its downstream-side un-packetingportion 23 with packet data PD′ generated by removing the RTP/UDP/IPpacket header from each of the upper layer packets ULP′.

The packet consecutiveness verification portion 22, based on theanalyzed information AN supplied from the reception portion 21, that is,the sequence No. of the RTP, verifies consecutiveness of the upper layerpackets ULP′ on whether, for example, any of the upper layer packetsULP′ has been lost on the communication path. The packet consecutivenessverification portion 22 supplies verification result information CK thatindicates a result of this verification to the interface portion 28 inthe packet de-interleaver 24.

The un-packeting portion 23 is provided corresponding to the packetingportion 14 in the encoder 10; it divides packet data PD′ supplied fromthe reception portion 21 in such a manner as to restore packet data PDgenerated by the packeting portion 14 to the packet-unit interleavepacket PIP before linking, thereby generating packet-unit interleavepackets PIP′. The un-packeting portion 23 supplies its down-stream sidepacket de-interleaver 24 with packet interleave data PID′ comprised ofthe plural packet-unit interleave packets PIP′ thus generated.

The packet de-interleaver 24 is provided corresponding to the packetinterleaver 13 in the encoder 10; it performs such processing as torestore an order of packet interleave data PID on which interleaving isperformed by the packet interleaver 13 to an order of byte interleavepackets BIP that constitute the original byte interleave data BID. Inthis processing, in a case where the packet-unit interleave packets PIP′that constitute the packet interleave data PID′ supplied from theun-packeting portion 23 have been generated by performing foldinginterleaving with a depth of 6 and a period of 4 in units of byteinterleave packets as described above, it performs foldingde-interleaving with a depth of 6 and a period of 4 in units of byteinterleave packets on them, to generate byte interleave data BID′comprised of the plural byte interleave packets BIP′. In this case, thepacket de-interleaver 24, based on a sink byte whose value is replacedby the packet interleaver 13, synchronizes a beginning packet in thepacket interleave data PID′ supplied from the un-packeting portion 23,thereby performing folding de-interleaving in units of byte interleavepackets.

Further, if the packet-unit interleave packets PIP′ are generated byperforming block interleaving with a depth of 6 that is completed with108 byte interleave packets as described above, it performs blockde-interleaving with a depth of 6 that is completed with the 108 byteinterleave packets, to generate byte interleave data BID′ comprised ofthe plural byte interleave packets BIP′. In this case, the packetde-interleaver 24, based on a sink byte whose value is replaced by thepacket interleaver 13, detects the beginning of an interleave block inthe packet interleave data PID′ supplied from the un-packeting portion23 and synchronizes the packets, thus performing block de-interleavingin units of byte interleave packets.

Specifically, the packet de-interleaver 24, like the packet interleaver13, comprises an SDRAM 27 which is externally attached to each of theportions mounted as a programmable device and the interface portion 28for performing processing such as address generation and datatransmission and reception for the purpose of performing data write andread operations to this SDRAM 27. The packet de-interleaver 24sequentially transfers and writes items of packet interleave data PID′input to the interface portion 28 to the SDRAM 27 in accordance with apredetermined write address and sequentially reads the data written tothis SDRAM 27 in accordance with a predetermined read address that isdifferent from the write address, thereby performing de-interleaving onthe packet interleave data PID′ supplied from the un-packeting portion23.

In this case, the packet de-interleaver 24 can accommodate such asituation that items of the packet interleave data PID′ are notconsecutive, on the basis of verification result information CK suppliedfrom the packet consecutiveness verification portion 22. For example, ifit knows on the basis of verification result information CK that oneupper layer packet ULP′ is lost on the communication path, the packetde-interleaver 24, when writing data to the SDRAM 27, skips a regionenough to store six packet-unit interleave packets PIP′ that aretantamount to the one upper layer packet ULP′ to write the data on onehand and, on the other hand, reads data by performing ordinaryde-interleaving in accordance with a predetermined read address. Byperforming such an operation, the data read from the SDRAM 27 is data inwhich a portion corresponding to the lost packet is replaced with dataread from the same read address in a previous time slot, that is,invalid data.

The packet de-interleaver 24 restores a value “0×B7”, “0×B8” of a sinkbyte replaced by the packet interleaver 13 of the data obtained throughsuch an operation to an original value of “0×47”, to generate byteinterleave data BID′ to be output finally. The packet de-interleaver 24supplies its down-stream side byte de-interleaver 25 with the byteinterleave data BID′ comprised of the plural byte interleave packetsBIP′ thus generated. Note here that the packet interleaver 24 has afunction also as a reception buffer to achieve a purpose of, forexample, absorption of jitter occurring on the communication path, sothat the SDRAM 27 only needs to have a capacity to store the packet-unitinterleave packets PIP′ as many as at least 144 (in the case ofperforming folding de-interleaving with a depth of 6 and a period of 4)or 216 (in the case of performing block interleaving with a depth of 6that is completed with 108 byte interleave packets) plus a littlecapacity to achieve the purpose.

The byte de-interleaver 25 is provided corresponding to the byteinterleaver 12 in the encoder 12; it performs de-interleaving on each ofthe byte interleave packets BIP′ that constitute byte interleave dataBID′ supplied from the packet de-interleaver 24 in such a manner as torestore an order of the byte interleave data BID on which foldinginterleaving is performed by the byte interleaver 12 to an order ofencoded packets EP that constitute an original encoded data ED, therebygenerating encoded data ED′ comprised of plural encoded packets EP′. Forexample, if the byte interleave packets BIP′ that constitute the byteinterleave data BID′ are generated by performing folding interleavingwith a depth of 18 and a period of 12 in units of a byte as describedabove, it performs folding de-interleaving with depth of 18 and a periodof 12 in units of a byte, to generate encode data ED′ comprised of theplural encoded packets EP′. Further, if the byte interleave packets BIP′that constitute the byte interleave data BID′ are generated byperforming folding interleaving with a depth of 18 and a period of 3 inunits of four bytes as described above, it performs foldingde-interleaving with depth of 18 and a period of 3 in units of fourbytes, to generate encoded data ED′ comprised of the plural encodedpackets EP′.

Specifically, the byte de-interleaver 25, like the byte interleaver 12,comprises a DPRAM capable of high-speed random access in units of abyte, an address generation portion for performing data write and readoperations to this DPRAM, etc. The byte de-interleaver 25 sequentiallytransfers and writes items of input byte interleave data BID′ to theDPRAM in accordance with a predetermined write address and sequentiallyreads items of the written data in accordance with a predetermined readaddress that is different from the write address, thereby performingfolding de-interleaving on the byte interleave data BID′ supplied fromthe packet de-interleaver 24.

Such a byte de-interleaver 25 supplies its down-stream sideReed-Solomon-decoding portion 26 with encoded data ED′ comprised of theplural encoded packet EP′ thus generated. The encoded data ED′ on whichfolding de-interleaving is performed by this byte de-interleaver 25enters such a condition that 12-byte error data is contained in each ofthe 18×6=108 encoded packets EP′ if, for example, one upper layer packetULP′ is lost on the communication path.

Note here that like the byte interleaver 12, this byte de-interleaver 25can control addresses according to a predetermined address generationsystem, to reduce a capacity of a memory required to perform foldingde-interleaving, that is, the DPRAM, which will be described later.

The Reed-Solomon-decoding portion 26 is provided corresponding to theReed-Solomon-encoding portion 11 in the encoder 10; it performs decodingof a Reed-Solomon code on each of the encoded packets EP′ thatconstitute the encoded data ED′ supplied from the byte de-interleaver25, to restore a transport stream TS comprised of plural transportpackets TS. Specifically, the Reed-Solomon-decoding portion 26 performserror correction by using a 28-byte error correction code as a paritycontained in each of the 216-byte encoded packets EP′, to restore andoutput the transport stream TS comprised of 188-byte transport packetsTSP. If, for example, one upper layer packet ULP′ is lost on thecommunication path, this Reed-Solomon-decoding portion 26 can completelycorrect all bits because it can correct up to 14 bytes against a maximumnumber of error bytes contained in an arbitrary encoded packet EP′ of12.

The decoder 20 having such portions completely restores the transportstream TS input as an information sequence to the encoder 10 from thereceive data RD received through the predetermined communication pathand outputs it. FIGS. 11A-11E explain transition of the packet format inthe portions in the decoder 20 when folding interleaving processing isperformed in units of a packet by the packet interleaver. Further, FIGS.12A-12F explain transition of the packet format in the portions in thedecoder 20 when block interleaving processing is performed in units of apacket by the packet interleaver.

That is, the decoder 20, when having received the receive data RDthrough the reception portion 21 to generate packet data PD′ shown inFIG. 11A (FIG. 12A), divides these items of packet data PD′ by using theun-packeting portion 23, to generate packet interleave data PID′comprised of plural packet-unit interleave packets PIP′ shown in FIG.11B (FIG. 12B). It is supposed that the receive data RD is such that oneupper layer packet ULP′ is lost on the communication path and packetdata PD′ and a packet-unit interleave packet PIP′ that correspond tothis lost upper layer packet ULP′ are such as indicated by horizontallines in FIG. 11A (FIG. 12A) and FIG. 11B (FIG. 12B).

At this moment, information contained in one encoded packet EP generatedby the encoder 10 is sporadically dispersed into consecutive 144packet-unit interleave packets PIP′ as indicated by hatched portions inFIGS. 11A and 11B when folding interleaving processing is performed inunits of a packet and the information is dispersed by 12 bytes with aspacing of at least six packet-unit interleave packets PIP′therebetween.

The decoder 20 performs folding de-interleaving by using the packetde-interleaver 24 on each of the packet-unit interleave packets PIP′ inunits of a packet, to generate byte interleave data BID′ comprised ofplural byte interleave packets BIP′ dispersed into consecutive 18 byteinterleave packets BIP′ of 12 bytes, which are indicated by the hatchedportion and the horizontal line in FIG. 11C. In this case, the decoder20, based on verification result information CK supplied from the packetconsecutiveness verification portion 22, replaces data that correspondsto the lost upper layer packet ULP′ with invalid data, to generate byteinterleave data BID′ containing byte interleave packets BIP′ indicatedby the horizontal line having “?” attached to it in FIG. 11C.

Furthermore, as shown in FIG. 11D, the decoder 20 performs foldinginterleaving on each of the byte interleave packets BIP′ by using thebyte de-interleaver 25, to generate encoded data ED′ comprised of pluralencoded packets EP′. It is thus possible to handle an extremelysignificant burst error as large as 216×6=1296 bytes owing to one lostupper layer packet ULP′ as pieces of an at most 12-byte random errordispersed into the encoded packets EP′ as indicated by a cross-hatchedportion in FIG. 11D.

Further, when block interleaving processing is performed in units of apacket, information contained in one encoded packet EP generated by theencoder 10 is sporadically dispersed into consecutive 108 packet-unitinterleave packets PIP′ as indicated by the hatched portion in FIGS. 12Aand 12B in such a condition that information is dispersed by 12 bytesinto groups that each comprise consecutive six packet-unit interleavepackets PIP′ starting from the beginning of an interleave block in anone-to-one relationship.

The decoder 20 performs block de-interleaving on each of the packet-unitinterleave packets PIP′ in units of a packet by using the packetde-interleaver 24. In this case, when performing the blockde-interleaving in units of a packet, it utilizes a sink byte to detectthe beginning of the interleave block in the packet interleave data PID′and an RTP packet. FIG. 12B shows a result of detecting the sink byte,in which “B” indicates the beginning of the interleave block and “P”indicates a beginning position of the RTP packet.

As shown in FIG. 12C, the packet de-interleaver 24 performs blockde-interleaving using the 108 packet-unit interleave packets PIP′starting from the beginning of the detected interleave block, togenerate the byte interleave data BID′ comprised of plural byteinterleave packets BIP′ obtained by dispersing information contained inone encoded packet EP generated by the encoder 10 by 12 bytes into theconsecutive 18 byte interleave packets BIP′ as indicated by the hatchedportion and the horizontal line in FIG. 12D. In this case, the decoder20, based on verification result information CK supplied from the packetconsecutiveness verification portion 22, replaces data that correspondsto the lost upper layer packet ULP′ with invalid data, to generate thebyte interleave data BID′ containing the byte interleave packets BIP′indicated by the horizontal line having “?” attached to it in FIG. 12D.

Furthermore, as shown in FIG. 12D, the decoder 20 performs foldingde-interleaving on each of the byte interleave packets BIP′ by using thebyte de-interleaver 25, to generate the coded data ED′ comprised ofplural encoded packets EP′. It is thus possible to handle an extremelysignificant burst error as large as 216×6=1296 bytes owing to one lostupper layer packet ULP′ as pieces of an at most 12-byte random errordispersed into the encoded packets EP′ as indicated by the cross-hatchedportion in FIG. 12E.

Note here that the dispersed information indicated by the hatchedportions in FIGS. 11A and 11B is integrated into one transport packetTSP as indicated by the solid grid in FIG. 11E. Further, the dispersedinformation indicated by the hatched portions in FIGS. 12A and 12B isintegrated into one transport packet TSP as indicated by the solid gridin FIG. 12F.

As shown in FIGS. 11E and 12F, then, the decoder 20 decodes aReed-Solomon code by using the Reed-Solomon-decoding portion 26, togenerate a transport stream TS comprised of plural transport packets TSPwhose errors are completely corrected.

In such a manner, even if such the receive data RD is received that aburst error has occurred in information contained in at most one upperlayer packet ULP′, the decoder 20 can completely correct this bursterror. In this case, even if the receive data RD comprised of pluralupper layer packets ULP′ is received in a condition where one of theupper layer packets ULP′ in the transmit data TD generated by theencoder 10 is lost on the communication path, the decoder 20 canreplaces lost blank data with invalid data to regard it as a bursterror, thereby completely restoring information that corresponds to thelost upper layer packet ULP′.

Further, like the encoder 10, the decoder 20 can install the bytede-interleaver 25 by using the small-capacity DPRAM incorporated in theprogrammable device and the packet de-interleaver 24 by using the SDRAM27 with a relatively large capacity that is externally mounted to theprogrammable device, thereby saving on memory resources provided in theprogrammable device and simplifying peripheral circuits owing to burstaccess to the SDRAM 27. By thus performing two-stage de-interleaving byuse of the DPRAM and the SDRAM 27, like the encoder 10, the decoder 20can complementarily avoid disadvantages of these memories and, whenperforming de-interleaving in units of a packet, use the externallymounted SDRAM 27 instead of the small-capacity DPRAM incorporated in theprogrammable device, thereby reducing the costs and performinghigh-speed operations by accessing the SDRAM 27 in units of a packet.

Note here that the byte interleaver 12 in the encoder 10 and the bytede-interleaver 25 in the decoder 20 can control addresses according tothe predetermined address generation system as described above, toreduce the capacity of the memories required to perform foldinginterleaving and folding de-interleaving respectively in units of a byteor a unit. It is detailed as follows.

To use the DPRAM as a memory in performing folding interleaving orfolding de-interleaving in units of a byte or a unit, typically, thewriting side to the DPRAM rearranges data, in terms of order, requiredto perform folding interleaving or folding de-interleaving, while on theother hand the reading side sequentially reads packets stored in theDPRAM one by one starting from its beginning address. Conversely, thewriting side can sequentially write the packets one by one starting fromthe beginning address of the DPRAM, while the reading side from DPRAMcan rearrange data, in terms of order, required to perform foldinginterleaving or folding de-interleaving, thereby performing foldinginterleaving or folding de-interleaving in units of a byte or a unit.Therefore, in the DPRAM, even if there is a region from which data isread because it is already used to perform folding interleaving orfolding de-interleaving, this region is not used immediately after thedata is read and enters such a condition that about half a regionreserved for folding interleaving or folding de-interleaving is leftunused.

Therefore, the byte interleaver 12 and the byte de-interleaver 25, whenthey have read data from a certain region in the DPRAM, each write thedata to be next written to this region, thereby realizing foldinginterleaving or folding de-interleaving. That is, the byte interleaver12 and the byte de-interleaver 25 eliminate used blank regions in theDPRAM so that only such significant data as to be used hereafter infolding interleaving or folding de-interleaving may always be stored ina preserved region. In such a manner, the byte interleaver 12 and thebyte de-interleaver 25 can each minimize the capacity of the DPRAMrequired to perform folding interleaving or folding de-interleaving.

To realize data write and read operations to such a DPRAM, the byteinterleaver 12 and the byte de-interleaver 25 control addresses inaccordance with an address generation system described with reference toFIGS. 13A through 24.

The following will describe it with reference to a case whereinterleaving and de-interleaving are performed in units of a byte and aunit. To simplify the description thereof, it is assumed that to performinterleaving and de-interleaving in units of a byte, interleaving isperformed with a depth of 4 and a period of 3 on 12-byte encoded packetEP by the byte interleaver 12, to generate byte interleave data BID of12 bytes and folding de-interleaving with a depth of 4 and a period of 3is performed on byte interleave BID′ by the byte de-interleaver 25, togenerate 12-byte encoded packet EP′. Further, the description is madealso based on the assumption that to perform interleaving orde-interleaving in units of a unit, regarding each two bytes as oneunit, folding interleaving with a depth of 4 and a period of 3 isperformed on a 24-byte encoded packet EP in units of a unit by using thebyte interleaver 12, to generate byte interleave data BID of 24 bytesand de-interleaving with a depth of 4 and a period of 3 is performed onbyte interleave data BID′ in units of a unit by using the bytede-interleaver 25, to generate 24-byte encoded packets EP′.

Note here that although when the byte interleaver 12 and the bytede-interleaver 25 ordinarily perform folding interleaving and foldingde-interleaving with a depth of 4 and a period of 3 respectively on anencoded packet EP comprised of such a number of bytes as to be equal toa product of the depth of the folding interleaving or foldingde-interleaving and the number of bytes per packet, for example, 12bytes as described above, a memory having a capacity of 12×4=48 bytes isused in mounting, such a memory as to have a smaller capacity is used toenable the mounting.

First, operations in the case of performing the processing in units of abyte are described as follows. The byte interleaver 12 classifies bytesof a certain encoded packet EP in accordance with how much these bytesare delayed from their belonging packets to storage packets when foldinginterleaving is performed on them. Furthermore, these classified bytesare collectively managed in consecutive addresses on a memory map in theDPRAM. It is here assumed that the number of packets delayed withrespect to an original packet to which a certain byte belongs isreferred to as a “delay” and a group of bytes having the same number ofdelay packets is referred to as a “delay group”. That is, the byteinterleaver 12 classifies such bytes of an arbitrary encoded packet EPthat these bytes may have the same number of delay packets which is thenumber of delays of a byte interleave packet BIP in which these bytesare stored when folding interleaving is performed on this encoded packetEP, into one delay group. Furthermore, it handles data for each of thesedelay groups by generating a write address and a read address so thatwrite and read operations may be performed to consecutive addresses inthe DPRAM for each of the delay groups.

To classify the bytes of a certain encoded packet EP into such a delaygroup, the byte interleaver 12 is provided with, as an addressgeneration portion, two auxiliary counters, although not shown, forassisting in calculation of write and read addresses used to performdata write and read operations to the DPRAM. Specifically, assuming thatincoming 12-byte encoded packets EP are assigned packet Nos. 0, 1, 2, 3,. . . as shown in FIG. 13A and bytes of each of these encoded packets EPare assigned byte Nos. 0-11 as shown in FIG. 13B, the byte interleaver12 is provided with, as auxiliary counters, a first counter for countingfor each of the packets by incrementing count value cnt_del (0-3) thatcorresponds to a depth 4 of folding interleaving according to the byteNo. as shown in FIG. 13C and a second counter for counting for each ofthe packets by incrementing count value cnt_block (0-2) that correspondsto a period of the first counter as shown in FIG. 13D.

Note here that count value cnt_del given by the first counter indicatesthe above-mentioned number of delay packets, that is, a delay, whilecount value cnt_block given by the second counter indicates the numberof block assuming a period of the first counter to be one block.

The byte interleaver 12 uses such count value cnt_del given by the firstcounter and count value cnt_block given by the second counter, tocontrol data write and read operations to the DPRAM, thereby performingfolding interleaving on the encoded packets EP. In this case, the byteinterleaver 12, when having received encoded packets EP to undergofolding interleaving, starts writing data to the DPRAM immediately,while it starts reading data from the DPRAM simultaneously with datawriting or as delayed by a predetermined fixed number of clock. Whenhaving received an encoded packet EP, to avoid such a situation thatsignificant data written to the DPRAM may be overwritten by any otherdata before the significant data is read, the byte interleaver 12 needsto read all the data completely before the next encoded packet EP isinput after the data is written to the DPRAM.

Specifically, the byte interleaver 12 performs write and read operationsof bytes classified into delay groups to the DPRAM as shown in, forexample, FIGS. 14A-14D. It is supposed here that a group of bytes foreach packet No. comprised of three bytes in accordance with count valuecnt_del of “0” is referred to as delay group del0, a group of bytes foreach packet No. comprised of three bytes in accordance with count valuecnt_del of “1” is referred to as delay group del1, a group of bytes foreach packet No. comprised of three bytes in accordance with count valuecnt_del of “2” is referred to as delay group del2, and a group of bytesfor each packet No. comprised of three bytes in accordance with countvalue cnt_del of “3” is referred to as delay group del3. Further, inFIGS. 14B-14D, delay groups del0, del1, del2, and del3 in an encodedpacket EP with a packet No. of “n” are supposed to be written as “n-0”,“n-1”, “n-2”, and “n-3” respectively.

That is, in preparation for performing folding interleaving, the byteinterleaver 12 sets to a predetermined initial value such as “0” anreference address addr_base that is an address of the DPRAM at a momentwhen the first and second counters are released from a reset state andthat indicates a beginning from which data write and read operations tothe DPRAM start as indicated by a bold horizontal line in the leftmostportion in FIG. 14B. Then, when having received an encoded packet EPhaving packet No. “0” as indicated by the leftmost packet No. in FIG.14A, it classifies bytes of this encoded packet EP into four three-bytedelay groups of del0 (0-0), dell (0-1), del2 (0-2), and del3 (0-3) onthe basis of count value cnt_del given by the first counter as indicatedby the leftmost portion in FIG. 14B. That is, in the packet of packetNo. “0”, the bytes of byte Nos. “0, 4, and 8”, those of byte Nos. “1, 5,and 9”, those of byte Nos. “2, 6, and 10”, and those of byte Nos. “3, 7,and 11” are classified into del0 (0-0), dell (0-1), del2 (0-2), and del3(0-3) respectively.

Further, the byte interleaver 12 generates a write address in such amanner as to, as indicated by the leftmost portion in FIG. 14C, avoidwriting the bytes belonging to delay group dell (0-0) of these fourdelay groups del0 (0-0), dell (0-1), del2 (0-2), and del3 (0-3) to theDPRAM and, instead, write the bytes belonging to delay group dell (0-1)to region w1 which is two blocks ahead of the above-mentioned referenceaddress addr_base in the DPRAM, the bytes belonging to delay group del2(0-2) to region w2 which is (2+3) blocks ahead of the above-mentionedreference address addr_base in the DPRAM, the bytes belonging to delaygroup del3 (0-3) to a region which is (2+3+4) blocks ahead of theabove-mentioned reference address addr_base in the DPRAM, that is, thecirculated beginning region w3.

Further, the byte interleaver 12 performs a read operation as well assuch a write operation to the DPRAM. That is, the byte interleaver 12uses the bytes belonging to delay group del0 of four delay groups del0,del1, del2, and del3 written in the DPRAM as they are because thesebytes are not written to the DPRAM. Further, it generates a read addressin such a manner as to read the bytes belonging to delay group dell fromregion r1 which is one block behind the reference address addr_base inthe DPRAM, the bytes belonging to delay group del2 from region r2 whichis (1+2) blocks behind the reference address addr_base in the DPRAM, andthe bytes belonging to delay group del3 from region r3 which is (1+2+3)blocks behind the reference address addr_base in the DPRAM. However,since no data is written in either of regions r1, r2, or r3 at thismoment, there is actually no data to be read by the byte interleaver 12.

Therefore, the byte interleaver 12 outputs data comprised of the bytesclassified as delay group del0 (0-0) as indicated by the leftmostportion in FIG. 14D.

Subsequently, in preparation for inputting the next encoded packet EP,the byte interleaver 12 moves forward the reference address addr_base byone block as indicated by the bold horizontal line in the secondleftmost portion in FIG. 14B and, as indicated by the second leftmostportion in FIG. 14A, inputs the next encoded packet EP with packet No.“1” and, as indicated by the second leftmost portion in FIG. 14B,classifies the bytes that constitute this encoded packet EP into fourthree-byte groups del0 (1-0), del1 (1-1), del2 (1-2), and del3 (1-3) onthe basis of count value cnt_del given by the first counter.

Then, the byte interleaver 12, as indicated by the second leftmostportion in FIG. 14C, avoid writing to the DPRAM the bytes of delay groupdel0 (1-0) of these four delay groups del0 (1-0), del1 (1-1), del2(1-2), and del3 (1-3) and, instead, writes the bytes belonging to delaygroups del1 (1-1), del2 (1-2), and del3 (1-3) to the region to which aread operation was performed before the encoded packet EP has beeninput. That is, it generates a write address in such a manner as towrite the bytes belonging to delay group del1 (1-1) to region w1(=region r2 for the previous packet No.) which is two blocks behind thereference addr_base in the DPRAM, the bytes belonging to delay groupdel2 (1-2) to region w2 (=region r3 for the previous packet No.) whichis (2+3) blocks behind the reference address addr_base in the DPRAM, thebytes belonging to delay group del3 (1-3) to the region which is (2+3+4)blocks behind the reference address addr_base in the DPRAM, that is, thecirculated beginning region w3 (=region r1 for the previous packet No.).

Further, the byte interleaver 12 uses the bytes belonging to group del0,of four delay groups del0, del1, del2, and del3 written to the DPRAM, asthey are because they are not written to the DPRAM. Further, itgenerates a read address in such a manner as to read the bytes belongingto delay group del1 from region r1 which is one block behind thereference address addr_base in the DPRAM, the bytes belonging to delaygroup del2 from region r2 which is (1+2) blocks behind the referenceaddress addr_base in the DPRAM, and the bytes belonging to delay groupdel3 from region r3 which is (1+2+3) blocks behind the reference addressaddr_base in the DPRAM. Note here that the byte interleaver 12 actuallyreads only delay group del1 (0-1) because no data is written to regionsr2 and r3 and region r1 is the same as region w1 at the time when anencoded packet EP with packet No. “0” is input and delay group del1(0-1) is written in it.

Accordingly, the byte interleaver 12, as indicated by the secondleftmost portion in FIG. 14D, outputs data comprised of the bytesclassified as delay groups del0 (1-0) and del1 (0-1).

Subsequently, in preparation for inputting the next encoded packet EP,the byte interleaver 12 moves forward the reference address addr_baseanother one block as indicated by the bold horizontal line in the thirdleftmost portion in FIG. 14B and, as indicated by the third leftmostportion in FIG. 14A, inputs the next encoded packet with packet No. “2”and, as indicated by the third leftmost portion in FIG. 14B, classifiesthe bytes that constitute this encoded packet EP into four three-bytedelay groups del0 (2-0), del1 (2-1), del2 (2-2), and del3 (2-3) on thebasis of count value cnt_del given by the first counter.

Then, the byte interleaver 12 generates a write address in such a manneras to, as indicated by the third leftmost portion in FIG. 14C, avoidwriting the bytes belonging to delay group del1 (2-0) of these fourdelay groups del0 (2-0), del1 (2-1), del2 (2-2), and del3 (2-3) to theDPRAM and, instead, write the bytes belonging to delay group del1 (2-1)to region w1 which is two blocks behind the reference address addr_basein the DPRAM, the bytes belonging to delay group del2 (2-2) to region w2which is (2+3) blocks behind the reference address addr_base in theDPRAM, the bytes belonging to delay group del3 (2-3) to a region whichis (2+3+4) blocks behind the reference address addr_base in the DPRAM,that is, the circulated beginning region w3.

Further, the byte interleaver 12 uses the bytes belonging to delay groupdel0 of four delay groups del0, del1, del2, and del3 written in theDPRAM as they are because these bytes are not written to the DPRAM.Further, it generates a read address in such a manner as to read thebytes belonging to delay group del1 from region r1 which is one blockbehind the reference address addr_base in the DPRAM, the bytes belongingto delay group del2 from region r2 which is (1+2) blocks behind thereference address addr_base in the DPRAM, and the bytes belonging todelay group del3 from region r3 which is (1+2+3) blocks behind thereference address addr_base in the DPRAM. At this moment, since no datais written in regions r3 and region r1 is the same as region w1 at thetime when an encoded packet with packet No. “1” is input and region r2is the same as region w2 at the time when an encoded packet EP withpacket No. “0” is input and has delay groups del1 (1-1) and del2 (0-2)written in it, the byte interleaver 12 actually reads only these delaygroups del1 (1-1) and del2 (0-2).

Accordingly, the byte interleaver 12 outputs data comprised of the bytesclassified as delay groups del0 (2-0), del1 (1-1), and del2 (0-2) asindicated by the third leftmost portion in FIG. 14D.

Similarly, in preparation for inputting the next encoded packet EP, thebyte interleaver 12 moves forward the reference address addr_base byanother one block as indicated by the bold horizontal line in the fourthleftmost portion in FIG. 14B and, as indicated by the fourth leftmostportion in FIG. 14A, inputs the next encoded packet EP with packet No.“3” and, as indicated by the fourth leftmost portion in FIG. 14B,classifies the bytes that constitute this encoded packet EP into fourthree-byte groups del0 (3-0), del1 (3-1), del2 (3-2), and del3 (3-3) onthe basis of count value cnt_del given by the first counter.

Then, the byte interleaver 12 generates a write address in such a manneras to, as indicated by the fourth leftmost portion in FIG. 14C, avoidwriting to the DPRAM the bytes of delay group del0 (3-0) of these fourdelay groups del0 (3-0), del1 (3-1), del2 (3-2), and del3 (3-3) and,instead, write the bytes belonging to delay groups del1 (3-1) to regionw1 which is two blocks behind the reference addr_base in the DPRAM, thebytes belonging to delay group del2 (3-2) to region w2 which is (2+3)blocks behind the reference address addr_base in the DPRAM, the bytesbelonging to delay group del3 (3-3) to a region which is (2+3+4) blocksbehind the reference address addr_base in the DPRAM, that is, thecirculated beginning region w3.

At this moment, details of the data mapped to the addresses in the DPRAMare such as shown in FIG. 15. That is, in the byte interleaver 12, asfor the regions that can store three-byte blocks of addresses 0-2, delaygroup del3 (0-3) which has packet No. “0” and the number of delaypackets “3” is stored, in which the bytes belonging to these delaygroups are written to the consecutive addresses starting from thosehaving the lower numbered byte Nos. in such a manner that the data withbyte No. “3” may be stored in a region of address 0, the data with byteNo. “7” may be stored in a region of address 1, and the data with byteNo. “11” may be stored in a region of address 2.

Further, the byte interleaver 12 generates a read address in such amanner as to, as indicated by the fourth leftmost portion in FIG. 14C,read the bytes belonging to delay group del0 as they are because theyare not written to the DPRAM, the bytes belonging to delay group del1from region r1 which is one block behind the reference address addr_basein the DPRAM, the bytes belonging to delay group del2 from region r2which is (1+2) blocks behind the reference address addr_base in theDPRAM, and the bytes belonging to delay group del3 from region r3 whichis (1+2+3) blocks behind the reference address addr_base in the DPRAM.In this case, region r1 is the same as region w1 at the time when anencoded packet EP with packet No. “2” is input, region r2 is the same asregion w2 at the time when an encoded packet EP with packet No. “1” isinput, and region r3 is the same as region w3 at the time when anencoded packet EP with packet No. “0” is input and has delay groups del1(2-1), del2 (1-2), and del3 (0-3) written in it, so that the byteinterleaver 12 actually reads these delay groups del1 (2-1), del2 (1-2),and del3 (0-3).

Accordingly, the byte interleaver 12 outputs data comprised of the bytesclassified as delay groups del0 (3-0), del1 (2-1), del2 (1-2), and del3(0-3) as indicated by the fourth leftmost portion in FIG. 14D.

In such a manner, the byte interleaver 12 classifies the bytes into thedelay groups each time an encoded packet EP is input and, based on writeand read addresses in accordance with the above-mentioned addressgeneration system, performs managed write and read operations to theconsecutive addresses on a memory map in the DPRAM for each of the delaygroups. With this, the byte interleaver 12 can immediately write thenext data to the data storage region from which data is read and onwhich interleaving is performed completely, as a region to which thenext data is written. That is, it is possible to eliminate a uselessregion (i.e., a region on which interleaving is performed completely andin which data is left as written) of the DPRAM regions, thus minimizinga required capacity of the DPRAM. In this case, although typically thebyte interleaver 12 requires such a DPRAM as to have a capacity equal toa product of a depth D (=4) of folding interleaving and the number ofbytes N (=12) per input packet, that is, D×N (=4×12=48) bytes, it onlyneed to use such a DPRAM as to have a capacity of only nine three-byteregions, that is, 27 bytes as shown in FIG. 14C by performing theabove-mentioned address control, in order to perform the similar foldinginterleaving. Further, the byte interleaver 12 can perform a writeoperation to consecutive addresses for each of the classified delaygroups and a read operation to these consecutive addresses for each ofthe written delay groups, thereby easily calculating a write address anda read address.

Next, the byte de-interleaver 25 will be described.

The byte de-interleaver 25, like the byte interleaver 12, classifiesbytes that constitute a byte interleave packet BIP′ into delay groupsand handles data for each of these delay groups, to perform addresscontrol symmetrical to the byte interleaver 12, thereby performingfolding de-interleaving.

That is, the byte de-interleaver 25, like the byte interleaver 12, isprovided with, as an address generation portion, two auxiliary counters,although not shown, for assisting in calculation of write and readaddresses used to perform data write and read operations to the DPRAM.Specifically, assuming that incoming byte interleave packets BIP′ of 12bytes are assigned packet Nos. 0, 1, 2, 3, . . . as shown in FIG. 16Aand bytes of each of these byte interleave packets BIP′ are assignedbyte Nos. 0-11 as shown in FIG. 16B, the byte de-interleaver 25 isprovided with, as auxiliary counters, a first counter for counting foreach of the packets by decrementing count value cnt_del (0-3) thatcorresponds to a depth 4 of folding de-interleaving according to thebyte No. as shown in FIG. 16C and a second counter for counting for eachof the packets by incrementing count value cnt_block (0-2) thatcorresponds to a period of the first counter as shown in FIG. 16D. Notehere that it differs from the byte interleaver 12 in that count valuecnt_del given by the first counter is not incremented but decremented.

Like the byte interleaver 12, the byte de-interleaver 25 uses such countvalue cnt_del given by the first counter and count value cnt_block givenby the second counter, to control data write and read operations to theDPRAM, thereby performing folding de-interleaving on the byte interleavepackets BIP′. The byte de-interleaver 25, when having received byteinterleave packets BIP′ to undergo folding de-interleaving, startswriting data to the DPRAM immediately, while it starts reading data fromthe DPRAM simultaneously with data writing or as delayed by apredetermined fixed number of clock pulses. When having received a byteinterleave packet BIP′, to avoid such a situation that significant datawritten to the DPRAM may be overwritten by any other data before thesignificant data is read, the byte de-interleaver 25 needs to read allthe data completely before the next byte interleave packet BIP′ is inputafter the data is written to the DPRAM.

Specifically, when having received byte interleave packets BIP′comprised of a data array output from the byte interleaver 12, the bytede-interleaver 25 performs write and read operations of bytes classifiedinto delay groups to the DPRAM as shown in, for example, FIGS. 17A-17D.It is supposed here, as in the case shown in FIG. 14B earlier, that agroup of bytes for each packet No. comprised of three bytes inaccordance with count value cnt_del of “0” is referred to as delay groupdel0, a group of bytes for each packet No. comprised of three bytes inaccordance with count value cnt_del of “1” is referred to as delay groupdel1, a group of bytes for each packet No. comprised of three bytes inaccordance with count value cnt_del of “2” is referred to as delay groupdel2, and a group of bytes for each packet No. comprised of three bytesin accordance with count value cnt_del of “3” is referred to as delaygroup del3.

That is, in preparation for performing folding de-interleaving, the bytede-interleaver 25 sets to a predetermined initial value such as “0” thereference address addr_base that is an address of the DPRAM at a momentwhen the first and second counters are released from a reset state andthat indicates a beginning from which data write and read operations tothe DPRAM start as indicated by the bold horizontal line in the leftmostportion in FIG. 17B. Then, when having received a byte interleave packetBIP′ having packet No. “0” as indicated by the leftmost packet No. inFIG. 17A, it classifies bytes of this byte interleave packet BIP′ intofour three-byte delay groups of del0 (0-3), del1 (1-2), del2 (2-1), anddel3 (3-0) based on count value cnt_del given by the first counter asindicated by the leftmost portion in FIG. 17B.

Note here that in contrast to FIG. 14B given earlier, in FIG. 17B, countvalue cnt_del given by the first counter and a value of “m” of a delaygroup written as “n-m” are made different from each other for thepurpose of easily explaining how to restore an encoded packet EP′ thatcorresponds to an encoded packet EP by performing folding interleavingon the byte interleave packet BIP′.

Then, the byte interleaver 25 generates a write address in such a manneras to, as indicated by the leftmost portion in FIG. 17C, avoid writingthe bytes belonging to delay group del0 (0-3) of these four delay groupsdel0 (0-3), del1 (1-2), del2 (2-1), and del3 (3-0) to the DPRAM and,instead, write the bytes belonging to delay group del1 (1-2) to regionw3 which is two blocks behind the above-mentioned reference addressaddr_base in the DPRAM, the bytes belonging to delay group del2 (2-1) toregion w2 which is (2+3) blocks behind the reference address addr_basein the DPRAM, the bytes belonging to delay group del3 (3-0) to a regionwhich is (2+3+4) blocks behind the reference address addr_base in theDPRAM, that is, the circulated beginning region w1.

Further, the byte de-interleaver 25 performs a read operation as well assuch a write operation to the DPRAM. That is, the byte de-interleaver 25uses the bytes belonging to delay group del0 of four delay groups del0,del1, del2, and del3 written in the DPRAM as they are because thesebytes are not written to the DPRAM. Further, it generates a read addressin such a manner as to read the bytes belonging to delay group del1 fromregion r3 which is one block behind the reference address addr_base inthe DPRAM, the bytes belonging to delay group del2 from region r2 whichis (1+2) blocks behind the reference address addr_base in the DPRAM, andthe bytes belonging to delay group del3 from region r1 which is (1+2+3)blocks behind the reference address addr_base in the DPRAM. However,since no data is written in either of regions r1, r2, or r3 at thismoment, there is actually no data to be read by the byte de-interleaver25.

Therefore, the byte de-interleaver 25 outputs data comprised of thebytes classified as delay group del0 (0-3) as indicated by the leftmostportion in FIG. 17D.

Subsequently, in preparation for inputting the next byte interleavepacket BIP′, the byte de-interleaver 25 moves forward the referenceaddress addr_base by one block as indicated by the bold horizontal linein the second leftmost portion in FIG. 17B and, as indicated by thesecond leftmost portion in FIG. 17A, inputs the next byte interleavepacket BIP′ with packet No. “1” and, as indicated by the second leftmostportion in FIG. 17B, classifies the bytes that constitute this byteinterleave packet BIP′ into four three-byte groups del0 (1-3), del1(2-2), del2 (3-1), and del3 (0-0) on the basis of count value cnt_delgiven by the first counter.

Then, the byte de-interleaver 25, as indicated by the second leftmostportion in FIG. 17C, avoid writing to the DPRAM the bytes of delay groupdel0 (1-3) of these four delay groups del0 (1-3), del1 (2-2), del2(3-1), and del3 (0-0) and, instead, writes the bytes belonging to delaygroups del1 (2-2), del2 (3-1), and del3 (0-0) to each of the regions towhich a read operation has been performed before the encoded packet EPis input. That is, it generates a write address in such a manner as towrite the bytes belonging to delay group del1 (2-2) to region w3(=region r2 for the previous packet No.) which is two blocks behind thereference addr_base in the DPRAM, the bytes belonging to delay groupdel2 (3-1) to region w2 (=region r1 for the previous packet No.) whichis (2+3) blocks behind the reference address addr_base in the DPRAM, thebytes belonging to delay group del3 (0-0) to the region which is (2+3+4)blocks behind the reference address addr_base in the DPRAM, that is, thecirculated beginning region w1 (=region r3 for the previous packet No.).

Further, the byte de-interleaver 25 uses the bytes belonging to groupdel0, of four delay groups del0, del1, del2, and del3 written to theDPRAM, as they are because they are not written to the DPRAM. Further,it generates a read address in such a manner as to read the bytesbelonging to delay group del1 from region r3 which is one block behindthe reference address addr_base in the DPRAM, the bytes belonging todelay group del2 from region r2 which is (1+2) blocks behind thereference address addr_base in the DPRAM, and the bytes belonging todelay group del3 from region r1 which is (1+2+3) blocks behind thereference address addr_base in the DPRAM. Note here that the bytede-interleaver 25 actually reads only delay group del1 (1-2) because nodata is written to regions r1 and r2 and region r3 is the same as regionw3 at the time when a byte interleave packet BIP′ with packet No. “0” isinput and delay group del1 (1-2) is written in it.

Accordingly, the byte de-interleaver 25, as indicated by the secondleftmost portion in FIG. 17D, outputs data comprised of the bytesclassified as delay groups del0 (1-3) and del1 (1-2).

Subsequently, in preparation for inputting the next byte interleavepacket BIP′, the byte de-interleaver 25 moves forward the referenceaddress addr_base another one block as indicated by the bold horizontalline in the third leftmost portion in FIG. 17B and, as indicated by thethird leftmost portion in FIG. 17A, inputs the next byte interleavepacket with packet No. “2” and, as indicated by the third leftmostportion in FIG. 17B, classifies the bytes that constitute this byteinterleave packet BIP′ into four three-byte delay groups del0 (2-3),del1 (3-2), del2 (0-1), and del3 (1-0) on the basis of count valuecnt_del given by the first counter.

Then, the byte de-interleaver 25 generates a write address in such amanner as to, as indicated by the third leftmost portion in FIG. 17C,avoid writing the bytes belonging to delay group del0 (2-3) of thesefour delay groups del0 (2-3), del1 (3-2), del2 (0-1), and del3 (1-0) tothe DPRAM and, instead, write the bytes belonging to delay group del1(3-2) to region w3 which is two blocks behind the reference addressaddr_base in the DPRAM, the bytes belonging to delay group del2 (0-1) toregion w2 which is (2+3) blocks behind the reference address addr_basein the DPRAM, the bytes belonging to delay group del3 (1-0) to a regionwhich is (2+3+4) blocks behind the reference address addr-base in theDPRAM, that is, the circulated beginning region w1.

Further, the byte de-interleaver 25 uses the bytes belonging to delaygroup del0 of four delay groups del0, del1, del2, and del3 written inthe DPRAM as they are because these bytes are not written to the DPRAM.Further, it generates a read address in such a manner as to read thebytes belonging to delay group del1 from region r3 which is one blockbehind the reference address addr_base in the DPRAM, the bytes belongingto delay group del2 from region r2 which is (1+2) blocks behind thereference address addr_base in the DPRAM, and the bytes belonging todelay group del3 from region r1 which is (1+2+3) blocks behind thereference address addr_base in the DPRAM. At this moment, since no datais written in region r1 and region r2 is the same as region w2 at thetime when a byte interleave packet with packet No. “0” is input andregion r3 is the same as region w3 at the time when a byte interleavepacket BIP′ with packet No. “1” is input and has delay groups del2 (2-1)and del1 (2-2) written in it, the byte de-interleaver 25 actually readsonly these delay groups del2 (2-1) and del1 (2-2).

Accordingly, the byte de-interleaver 25 outputs data comprised of thebytes classified as delay groups del0 (2-3), del1 (2-2), and del2 (2-1)as indicated by the third leftmost portion in FIG. 17D.

Similarly, in preparation for inputting the next byte interleave packetBIP′, the byte de-interleaver 25 moves forward the reference addressaddr_base by another one block as indicated by the bold horizontal linein the fourth leftmost portion in FIG. 17B and, as indicated by thefourth leftmost portion in FIG. 17A, inputs the next byte interleavepacket BIP′ with packet No. “3” and, as indicated by the fourth leftmostportion in FIG. 17B, classifies the bytes that constitute this byteinterleave packet BIP′ into four three-byte groups del0 (3-3), del1(0-2), del2 (1-1), and del3 (2-0) on the basis of count value cnt_delgiven by the first counter.

Then, the byte de-interleaver 25 generates a write address in such amanner as to, as indicated by the fourth leftmost portion in FIG. 17C,avoid writing to the DPRAM the bytes of delay group del0 (3-3) of thesefour delay groups del0 (3-3), del1 (0-2), del2 (1-1), and del3 (2-0)and, instead, write the bytes belonging to delay groups del1 (0-2) toregion w3 which is two blocks behind the reference addr_base in theDPRAM, the bytes belonging to delay group del2 (1-1) to region w2 whichis (2+3) blocks behind the reference address addr_base in the DPRAM, thebytes belonging to delay group del3 (2-0) to a region which is (2+3+4)blocks behind the reference address addr_base in the DPRAM, that is, thecirculated beginning region w1.

At this moment, details of the data mapped to the addresses in the DPRAMare such as shown in FIG. 18. That is, in the byte de-interleaver 25, asfor the regions that can store three-byte blocks of addresses 0-2, delaygroup del3 (3-0) which has packet No. “3” and the number of delaypackets “3” is stored, in which the bytes belonging to these delaygroups are written to the consecutive addresses starting from thosehaving the lower numbered byte Nos. in such a manner that the data withbyte No. “0” may be stored in a region of address 0, the data with byteNo. “4” may be stored in a region of address 1, and the data with byteNo. “8” may be stored in a region of address 2.

Further, the byte de-interleaver 25 generates a read address in such amanner as to, as indicated by the fourth leftmost portion in FIG. 17C,read the bytes belonging to delay group del0 of the four delay groups ofdel0, del1, del2, and del3 which are written to DPRAM as they arebecause they are not written to the DPRAM, the bytes belonging to delaygroup del1 from region r3 which is one block behind the referenceaddress addr_base in the DPRAM, the bytes belonging to delay group del2from region r2 which is (1+2) blocks behind the reference addressaddr_base in the DPRAM, and the bytes belonging to delay group del3 fromregion r1 which is (1+2+3) blocks behind the reference address addr_basein the DPRAM. In this case, region r1 is the same as region w1 at thetime when a byte interleave packet BIP′ with packet No. “0” is input,region r2 is the same as region w2 at the time when a byte interleavepacket BIP′ with packet No. “1” is input, and region r3 is the same asregion w3 at the time when a byte interleave packet BIP′ with packet No.“2” is input and has delay groups del3 (3-0), del2 (3-1), and del1 (3-2)written in it, so that the byte de-interleaver 25 actually reads thesedelay groups del3 (3-0), del2 (3-1), and del1 (3-2).

Accordingly, the byte de-interleaver 25 outputs data comprised of thebytes classified as delay groups del0 (3-3), del1 (3-2), del2 (3-1), anddel3 (3-0) as indicated by the fourth leftmost portion in FIG. 17D.

In such a manner, the byte de-interleaver 25 classifies the bytes intothe delay groups corresponding to an output after interleaving shown inFIG. 14D each time a byte interleave packet BIP′ is input and, based onwrite and read addresses in accordance with the above-mentioned addressgeneration system, performs managed write and read operations to theconsecutive addresses on a memory map in the DPRAM for each of the delaygroups. With this, like the byte interleaver 12, the byte de-interleaver25 can immediately write the next data to the data storage region fromwhich data is read and on which de-interleaving is performed completely,as a region to which the next data is written. That is, it is possibleto eliminate a useless region (i.e., a region on which interleaving isperformed completely and in which data is left as written) of the DPRAMregions, thus minimizing a required capacity of the DPRAM. In this case,although typically the byte de-interleaver 25 requires such a DPRAM asto have a capacity equal to a product of a depth D (=4) of foldingde-interleaving and the number of bytes N (=12) per input packet, thatis, D×N (=4×12=48) bytes, it can use such a DPRAM as to have a capacityof only nine three-byte regions, that is, 27 bytes as shown in FIG. 17Cby performing the above-mentioned address control, to perform thesimilar folding de-interleaving. Further, the byte de-interleaver 25 canperform a write operation to consecutive addresses for each of theclassified delay groups and a read operation to these consecutiveaddresses for each of the written delay groups, thereby easilycalculating a write address and a read address.

As described above, to perform folding interleaving or foldingde-interleaving with a depth of 4 and a period of 3 by inputting 12-bytepackets in units of a byte, the byte interleaver 12 and the bytede-interleaver 25 may handle the data for each delay group by having afirst counter for giving, for each packet, count value cnt_del (0-3)that corresponds to a depth 4 of folding interleaving or foldingde-interleaving according to a byte No. of each of the bytes thatconstitute an incoming packet and a second counter for giving, for eachpacket, count value cnt_block (0-2) that corresponds to a period of thisfirst counter.

Next, operations in the case of performing the processing in units of aunit will be described as follows. As in the case of performing theprocessing in units of a byte, the byte interleaver 12 classifies suchbytes of an arbitrary encoded packet EP that these bytes may have thesame number of delay packets that is the number of delays of a byteinterleave packet BIP in which these bytes are stored in units of a unitwhen folding interleaving is performed on this encoded packet EP, intoone delay group. Furthermore, it handles data for each of these delaygroups by generating a write address and a read address so that writeand read operations may be performed to consecutive addresses in theDPRAM for each of the delay groups.

To classify the bytes of a certain encoded packet EP into such a delaygroup, the byte interleaver 12, as in the case of performing theprocessing in units of a byte, is provided with two auxiliary countersfor assisting in calculation of write and read addresses used to performdata write and read operations to the DPRAM. Furthermore, since one unitprovides a unit of plural consecutive bytes, it is provided with anauxiliary counter for counting the byte in one unit.

Specifically, assuming that incoming 24-byte encoded packets EP areassigned packet Nos. 0, 1, 2, 3, . . . as shown in FIG. 19A and bytes ofeach of these encoded packets EP are assigned byte Nos. 0-23 as shown inFIG. 19B, the byte interleaver 12 is provided with, as auxiliarycounters, a third counter for counting for each of the packets byincrementing count value cnt_byte (0-1) that corresponds to the numberof bytes in one unit as shown in FIG. 19C, a first counter for countingfor each of the packets by incrementing count value cnt_del (0-3) thatcorresponds to a depth 4 of folding interleaving as shown in FIG. 19D,and a second counter for counting for each of the packets byincrementing count value cnt_block (0-2) that corresponds to a period ofthe first counter as shown in FIG. 19E.

The byte interleaver 12 uses such count value cnt_del given by the firstcounter, count value cnt_block given by the second counter, and furthercount value cnt_byte given by the third counter, to control data writeand read operations to the DPRAM, thereby performing foldinginterleaving on the encoded packets EP. In this case, the byteinterleaver 12, when having received encoded packets to undergo foldinginterleaving, starts writing data to the DPRAM immediately, while itstarts reading data from the DPRAM simultaneously with data writing oras delayed by a predetermined fixed number of clock. When havingreceived an encoded packet EP, to avoid such a situation thatsignificant data written to the DPRAM may be overwritten by any otherdata before the significant data is read, the byte interleaver 12 needsto read all the data completely before the next encoded packet EP isinput after the data has been written to the DPRAM.

If it is here supposed to perform write and read operations of the bytesclassified into the delay groups in units of a unit, as in theabove-mentioned case of FIGS. 14A-14D, the byte interleaver 12 canperform to the DPRAM the write and read operations of the bytesclassified into the delay groups. Note here that although data mapped tothe addresses in the DPRAM at a moment when an encoded packet EP withpacket No. “3” is input becomes such as shown in FIG. 15 if theprocessing is performed in units of a byte, when it is performed inunits of a unit, the processing unit is switched from one byte to oneunit (=two bytes), so that the data becomes such as shown in FIG. 20.That is, in the byte interleaver 12, as for the regions that can storethree units of data of addresses 0-5, the consecutive bytes of the unitsbelonging to the delay groups are written to the consecutive addressesstarting from those having the lower numbered byte Nos. in such a mannerthat delay group del3 (0-3), which has packet No. “0” and the number ofdelay packets “3”, is stored, in which items of data “6, 7” of thefourth unit are stored consecutively in a region of addresses 0 and 1,items of data “14, 15” of the eighth unit are stored consecutively in aregion of addresses 2 and 3, and items of data “22, 23” of the 12'thunit are stored consecutively in a region of addresses 4 and 5.

In such a manner, the byte interleaver 12 classifies the bytes into thedelay groups in units of a unit each time an encoded packet EP is inputand, based on write and read addresses in accordance with theabove-mentioned address generation system, performs managed write andread operations to the consecutive addresses on a memory map in theDPRAM for each of the delay groups. With this, the byte interleaver 12can immediately write the next data to the data storage region fromwhich data is read and on which interleaving is performed completely, asa region to which the next data is written. That is, it is possible toeliminate a useless region regarded as a region already used in theDPRAM, thus minimizing a required capacity of the DPRAM.

In this case, although typically the byte interleaver 12 requires such aDPRAM as to have a capacity equal to a product of a depth D (=4) offolding interleaving and the number of bytes N (=24) per input packet,that is, D×N (=4×24=96) bytes, it can use such a DPRAM as to have acapacity of only nine six-byte regions, that is, 54 bytes by performingthe above-mentioned address control, in order to perform the similarfolding interleaving. Further, the byte interleaver 12 can perform awrite operation to consecutive addresses for each of the classifieddelay groups and a read operation to these consecutive addresses foreach of the written delay groups, thereby easily calculating a writeaddress and a read address.

Next, the byte de-interleaver 25 will be described. The bytede-interleaver 25, like the byte interleaver 12, classifies bytes thatconstitute a byte interleave packet BIP′ into delay groups and handlesdata for each of these delay groups, to perform address controlsymmetrical to that of the byte interleaver 12, thereby performingfolding de-interleaving.

That is, the byte de-interleaver 25, like the byte interleaver 12, isprovided with, as the address generation portion, three auxiliarycounters, although not shown, for assisting in calculation of write andread addresses used to perform data write and read operations to theDPRAM. Specifically, assuming that incoming byte interleave packets BIP′of 24 bytes are assigned packet Nos. 0, 1, 2, 3, . . . as shown in FIG.21A and bytes of each of these byte interleave packets BIP′ are assignedbyte Nos. 0-23 as shown in FIG. 21B, the byte de-interleaver 25 isprovided with, as auxiliary counters, a third counter for counting foreach of the packets by incrementing count value cnt_byte (0-1) thatcorresponds to the number of bytes in one unit as shown in FIG. 21C, afirst counter for counting for each of the packets by incrementing countvalue cnt_del (0-3) that corresponds to depth 4 of folding interleavingas shown in FIG. 21D, and a second counter for counting for each of thepackets by incrementing count value cnt_block (0-2) that corresponds toa period of the first counter as shown in FIG. 21E.

Note here that it differs from the byte interleaver 12 in that countvalue cnt_del given by the first counter is not incremented butdecremented.

Like the byte interleaver 12, the byte de-interleaver 25 uses such countvalue cnt_del given by the first counter, count value cnt_block given bythe second counter, and count value cnt_byte given by the third counter,to control data write and read operations to the DPRAM, therebyperforming folding de-interleaving on the byte interleave packets BIP′.The byte de-interleaver 25, when having received the byte interleavepackets BIP′ to undergo folding de-interleaving, starts writing data tothe DPRAM immediately, while it starts reading data from the DPRAMsimultaneously with data writing or as delayed by a predetermined fixednumber of clock pulses. When having received a byte interleave packetBIP′, to avoid such a situation that significant data written to theDPRAM may be overwritten by any other data before the significant datais read, the byte de-interleaver 25 needs to read all the datacompletely before the next byte interleave packet BIP′ is input afterthe data is written to the DPRAM.

Note here that, when having received the byte interleave packets BIP′comprised of a data array output from the byte interleaver 12, the bytede-interleaver 25 can perform write and read operations of bytesclassified into delay groups to the DPRAM in units of a unit, therebyperforming write and read operations of the bytes classified into thedelay groups to the DPRAM similar to the above-mentioned case shown inFIGS. 17A-17D. Note here that although data mapped to the addresses inthe DPRAM at a moment when an encoded packet EP with packet No. “3” isinput becomes such as shown in FIG. 18 if the processing is performed inunits of a byte, if it is performed in units of a unit, the processingunit is switched from one byte to one unit (=two bytes), so that thedata becomes such as shown in FIG. 22.

That is, in the byte interleaver 12, as for the regions that can storethree units of data of addresses 0-5, the consecutive bytes of the unitsbelonging to the delay groups are written to the consecutive addressesstarting from those having the lower numbered byte Nos. in such a mannerthat delay group del3 (0-3) which has packet No. “0” and the number ofdelay packets “3” is stored, in which items of data “6, 7” of the fourthunit are stored consecutively in a region of addresses 0 and 1, items ofdata “14, 15” of the eighth unit are stored consecutively in a region ofaddresses 2 and 3, and items of data “22, 23” of the 12th unit arestored consecutively in a region of addresses 4 and 5.

That is, in the byte de-interleaver 25, as for the regions that canstore six bytes of data of addresses 0-5, the consecutive bytes of theunits belonging to the delay groups are written to the consecutiveaddresses starting from those having the lower numbered byte Nos. insuch a manner that delay group del3 (0-3) which has packet No. “3” andthe number of delay packets “3” is stored, in which items of data “0, 1”of the first unit are stored consecutively in a region of addresses 0and 1, items of data “8, 9” of the fifth unit are stored consecutivelyin a region of addresses 2 and 3, and items of data “16, 17” of theninth unit are stored consecutively in a region of addresses 4 and 5.

In such a manner, the byte de-interleaver 25 classifies the bytes intothe delay groups each time a byte interleave packet BIP′ is input and,based on write and read addresses in accordance with the above-mentionedaddress generation system, performs managed write and read operations tothe consecutive addresses on a memory map in the DPRAM for each of thedelay groups. With this, like the byte interleaver 12, the bytede-interleaver 25 can immediately write the next data to the datastorage region from which data is read and on which interleaving isperformed completely, as a region to which the next data is written.That is, it is possible to eliminate a useless region regarded as aregion already used in the DPRAM, thus minimizing a required capacity ofthe DPRAM.

In this case, although typically the byte de-interleaver 25 requiressuch a DPRAM as to have a capacity equal to a product of a depth D (=4)of folding de-interleaving and the number of bytes N (=24) per inputpacket, that is, D×N (=4×24=96) bytes, it can use such a DPRAM as tohave a capacity of only nine six-byte regions, that is, 54 bytes byperforming the above-mentioned address control, in order to perform thesimilar folding interleaving as shown in FIG. 17C. Further, the bytede-interleaver 25 can perform a write operation to consecutive addressesfor each of the classified delay groups and a read operation to theseconsecutive addresses for each of the written delay groups, therebyeasily calculating a write address and a read address.

As described above, to perform folding interleaving or foldingde-interleaving with a depth of 4 and a period of 3 on 24-byte encodedpackets Ep in units of a unit by using two bytes as one unit, the byteinterleaver 12 and the byte de-interleaver 25 may handle the data foreach delay group by having a first counter for giving, for each packet,count value cnt_del (0-3) that corresponds to a depth of foldinginterleaving or folding de-interleaving according to a byte No. of eachof the bytes that constitute an incoming packet, a second counter forgiving, for each packet, count value cnt_block (0-2) that corresponds toa period of this first counter, and a third counter for giving, for eachpacket, count value cnt_byte (0-1) that corresponds to the number ofbytes in each unit.

Therefore, assuming that the number of bytes per incoming packet to beN, a depth of folding interleaving or folding de-interleaving to be D, aperiod of folding interleaving or folding de-interleaving to be C, andthe number of bytes contained in each unit when folding interleaving isperformed to be U, the byte interleaver 12 and the byte de-interleaver25 may perform data write and read operations to the DPRAM for eachdelay group by having a first counter for giving, for each packet, countvalue cnt_del (0 through D-1) that corresponds to depth D of foldinginterleaving or folding de-interleaving according to a byte No. of eachof the bytes that constitute an incoming packet, a second counter forgiving, for each packet, count value cnt_block (0 through C-1) thatcorresponds to a period of this first counter, and a third counter forgiving, for each packet, count value cnt_byte (0-1) that corresponds tothe number of bytes in each unit. That is, the address generation systemby the byte interleaver 12 and the byte de-interleaver 25 can begeneralized as follows.

First, the byte interleaver 12 and the byte de-interleaver 25, to writedata to the DPRAM, each generate a write address that corresponds toeach delay group according to rules indicated by a series of processingsteps shown in FIG. 23, thereby controlling data writing to the DPRAM.

That is, as shown in FIG. 23, the byte interleaver 12 and the bytede-interleaver 25 each set the above-mentioned reference addressaddr_base to “0” at step S1 and, at step S2, decide whether there is apacket breakpoint to undergo folding interleaving or foldingde-interleaving.

If it is decided that there is no packet breakpoint, the byteinterleaver 12 and the byte de-interleaver 25 each operate the first,second, and third counters to write the bytes for each delay group tothe DPRAM on the basis of count value cnt-del given by the firstcounter.

That is, the byte interleaver 12 and the byte de-interleaver 25, ifcount value cnt_del by the first counter 1 is set to “0” at step S3,each classify the current byte into delay group del0 and, at step S4,generate no write address and go to step S2 without writing the bytesbelonging to delay group del0 to the DPRAM.

Further, the byte interleaver 12 and the byte de-interleaver 25, ifcount value cnt_del by the first counter is set to “1” at step S3, eachclassify the current byte into delay group del1 and, at step S5,generate the following:

-   -   (addr_base+CxUx2+cnt_blockxU+cnt_byte)        as a write address to write the bytes belonging to delay group        del1 to a region indicated by this write address and go to step        S2.

Furthermore, if count value cnt_del by the first counter is set to “2”at step S3, the byte interleaver 12 and the byte de-interleaver 25 eachclassify the current byte into delay group del2 and, at step S6,generate the following:

-   -   (addr_base+CxUx(2+3)+cnt_blockxU+cnt_byte)        as a write address to write the bytes belonging to delay group        del2 and go to step S2.

Furthermore, if count value cnt_del is set to “3” at step S3, the byteinterleaver 12 and the byte de-interleaver 25 each classify the bytesinto delay group del3 and, at step S7, generate the following:

-   -   (addr_base+CxUx(2+3+4)+cnt_blockxU+cnt_byte)        as a write address to write the bytes belonging to delay group        del3 to a region indicated by this write address and go to step        S2.

If count value cnt_del by the first counter is set to “D-1” at step S3,the byte interleaver 12 and the byte de-interleaver 25 each classify thecurrent byte into delay group del (D-1) and, at step S8, generate thefollowing:

-   -   (addr_base+CxUx(2+3+. . . +D)+cnt_blockxU+cnt_byte)        as a write address to write the bytes belonging to delay group        del (D-1) to a region indicated by this write address and go to        step S2.

The byte interleaver 12 performs such an operation by incrementing countvalue cnt_del from “0” to “D-1” until count value cnt_del becomes “D-1”and repeats this operation as many times as a value of the period C offolding interleaving, to end the processing on all of the bytes of eachpackets. The byte de-interleaver 25, on the other hand, performs such anoperation by decrementing count value cnt_del from “D-1” to “0” untilcount value cnt_del becomes “0” and repeats this operation as many timesas the value of the period C of the folding de-interleaving, to end theprocessing on all of the bytes of each packet.

In such a manner, the byte interleaver 12 and the byte de-interleaver 25each end the processing on the incoming packet and, if it has decided atstep S2 that there is a packet breakpoint, go to step S9. Then, the byteinterleaver 12 and the byte de-interleaver 25 respectively increase at apacket breakpoint a value of the reference address addr_base by a valueof “period C of folding interleaving or folding de-interleaving x thenumber of bytes U in unit”, that is, by one block region at step S9 andgo to step S2 again to wait for the next incoming packet.

The byte interleaver 12 and the byte de-interleaver 25 can each generatea write address for each delay group in accordance with such rules, tocontrol data writing to the DPRAM. Note here that when performingfolding interleaving in units of a byte, since each unit has “1” byte,setting U=1 and cnt_byte=0 in the above-mentioned general expression ofthe read address provides an expression for performing foldinginterleaving and folding de-interleaving in units of a byte. Further, inthis case, the third counter is unnecessary.

To read data from the DPRAM, on the other hand, the byte interleaver 12and the byte de-interleaver 25 each generate a read address thatcorresponds to each delay group according to rules indicated by a seriesof processing steps shown in FIG. 24, thereby controlling a data readingoperation from the DPRAM.

That is, as shown in FIG. 24, the byte interleaver 12 and the bytede-interleaver 25 each set the above-mentioned reference addressaddr_base to “0” at step S11 and, at step S12, decide whether there is apacket breakpoint to undergo folding interleaving or foldingde-interleaving.

If it is decided that there is no packet breakpoint, the byteinterleaver 12 and the byte de-interleaver 25 each operate the first andsecond counters to read the bytes for each delay group from the DPRAM onthe basis of count value cnt_del given by the first counter.

That is, the byte interleaver 12 and the byte de-interleaver 25, ifcount value cnt_del by the first counter 1 is set to “0” at step S13,each classify the current byte into delay group del0 and, at step S14,generate no read address and output the bytes belonging to delay groupdel0 as they are, then going to step S12 without writing them to theDPRAM.

Further, the byte interleaver 12 and the byte de-interleaver 25, ifcount value cnt_del by the first counter is set to “1” at step S13, eachgenerate the following:

-   -   (addr_base+CxUx1+cnt_blockxU+cnt_byte)        as a write address at step S15 to read as delay group del1 the        bytes stored in a region indicated by this read address and go        to step S12.

Furthermore, if count value cnt_del by the first counter is set to “2”at step S13, the byte interleaver 12 and the byte de-interleaver 25 eachgenerate the following:

-   -   (addr_base+CxUx(1+2)+cnt_blockxU+cnt_byte)        as a read address at step S16 to read as delay group del2 the        bytes stored in a region indicated by this read address and go        to step S12.

Furthermore, if count value cnt_del is set to “3” at step S13, the byteinterleaver 12 and the byte de-interleaver 25 each generate thefollowing:

-   -   (addr_base+CxUx(1+2+3)+cnt_blockxU+cnt_byte)        as a read address at step S17 to read as delay group del3 the        bytes stored in a region indicated by this read address and go        to step S12.

If count value cnt_del by the first counter is set to “D-1” at step S13,the byte interleaver 12 and the byte de-interleaver 25 each generate thefollowing:

-   -   (addr_base+CxUx(1+2+. . . (D-1))+cnt_blockxU+cnt_byte)        as a read address at step S18 to read as delay group del (D-1)        the bytes stored in a region indicated by this read address and        go to step S12.

The byte interleaver 12 performs such an operation by incrementing countvalue cnt_del from “0” to “D-1” until count value becomes “D-1” andrepeats this operation as many times as a value of the period C offolding interleaving, to end the processing on all of the bytes of eachpackets. The byte de-interleaver 25, on the other hand, performs such anoperation by decrementing count value cnt_del from “D-1” to “0” untilcount value cnt_del becomes “0” and repeats this operation as many timesas the value of the period C of the folding de-interleaving, to end theprocessing on all of the bytes of each packet.

In such a manner, the byte interleaver 12 and the byte de-interleaver 25each end the processing on the input packet and, if it has decided atstep S12 that there is a packet breakpoint, go to step S19. Then, thebyte interleaver 12 and the byte de-interleaver 25 respectively increaseat a packet breakpoint the value of the reference address addr_base by avalue of “period C of folding interleaving or folding de-interleaving xthe number of bytes U in unit”, that is, by one block region at step S19and go to step S12 again to wait for the next incoming packet.

The byte interleaver 12 and the byte de-interleaver 25 can each generatea read address for each delay group in accordance with such rules, tocontrol a data reading operation from the DPRAM. Note here that whenperforming folding interleaving in units of a byte, since each unit has“1” byte, setting U=1 and cnt_byte=0 in the above-mentioned generalexpression of the read address provides an expression for performingfolding interleaving and folding de-interleaving in units of a byte.Further, in this case, the third counter is unnecessary.

The byte interleaver 12 and the byte de-interleaver 25, respectively,can perform folding interleaving or folding de-interleaving with a depthof D and a period of C on a packet comprised of N bytes by performingdata write and read operations to the DPRAM in accordance with the rulesshown in FIGS. 23 and 24. In this case, although typically the byteinterleaver 12 and the byte de-interleaver 25 require such a DPRAM as tohave a capacity of D×N number of bytes, they only need to use such aDPRAM as to have a capacity of Cx(2+3+, . . . , +D)=Cx((1+D)xD/2-1)number of bytes by performing such data write and read operations.Specifically, to perform folding interleaving or folding de-interleavingwith a depth of 4 and a period of 3 in units of a byte on a packetcomprised of 12 bytes as in the example shown in FIGS. 13A-24A,typically the byte interleaver 12 and the byte de-interleaver 25 eachrequire such a DPRAM as to have a capacity of D×N=4×12=48 bytes asdescribed above, but by performing the above-mentioned operations, itonly needs to have such a DPRAM as to have a capacity of Cx(2+3+, . . ., +D)=Cx((1+D)xD/2-1)=3×((1+4)×4/2-1)=27 bytes; further, to performfolding interleaving or folding de-interleaving with a depth of 18 and aperiod of 12 on a packet comprised of 216 bytes as in the example shownin FIGS. 2A-12F, typically the byte interleaver 12 and the bytede-interleaver 25 each require such a DPRAM as to have a capacity ofD×N=18×216=3888 bytes, but by performing the above-mentioned operations,they only need to have such a DPRAM as to have a capacity of Cx(2+3+, .. . , +D)=Cx((1+D)xD/2-1)=12×((1+18)×18/2-1)=2040 bytes.

Further, to perform folding interleaving or folding de-interleaving inunits of a unit with a depth of 4 and a period of 3 by using two bytesas one unit on a packet comprised of 24 bytes, typically the byteinterleaver 12 and the byte de-interleaver 25 each require such a DPRAMas to have a capacity of D×N=4×24=96 bytes as described above, but byperforming the above-mentioned operations, it only needs to have such aDPRAM as to have a capacity of CxUx(2+3+, . . . ,+D)=CxU((1+D)xD/2-1)=3×2×((1+4)×4/2-1)=54 bytes; further, to performfolding interleaving or folding de-interleaving with a depth of 18 and aperiod of 3 on a packet comprised of 216 bytes by using four bytes asone unit as in the example shown in FIGS. 2A-12F, typically they eachrequire such a DPRAM as to have a capacity of D×N=18×216=3888 bytes, butby performing the above-mentioned operations, they only need to havesuch a DPRAM as to have a capacity of CxU(2+3+, . . . ,+D)=CxU((1+D)xD/2-1)=3×4×((1+18)×18/2-1)=2040 bytes.

In such a manner, the byte interleaver 12 and the byte de-interleaver 25only need to have such a memory as to have about half a typicallyrequired memory capacity, thereby enabling the required memory capacityto be largely reduced.

As described above, in a data transmission/reception system according tothe best mode, the encoder 10 can perform folding interleaving in unitsof a byte or a unit and interleaving in units of a packet, to achieve alarge depth of the interleaving by using a small capacity memory,thereby transmitting transmit data TD that enables even an errorcorrection code with a small code length to correct a significant bursterror containing a packet loss. The decoder 20 in the datatransmission/reception system, on the other hand, can completely correcta significant burst error containing a packet loss by performingde-interleaving in units of a packet that corresponds the encoder 10 andfolding de-interleaving in units of a byte or a unit on the receive dataRD received from the encoder 10.

The present invention is not limited to the above-mentioned mode. Forexample, although in the above-mentioned mode, the portions includingthe byte interleaver 12 and the packet interleaver 13 or those includingthe packet de-interleaver 24 and the byte de-interleaver 25 have eachbeen mounted as a programmable device, the present invention can beapplied even to a case where they are mounted as a dedicated integratedcircuit.

Further, although in the above-mentioned mode, a transport stream TSobtained by performing compression and encoding based on the MPEG-2standard has been input to the encoder 10 and decoded by the decoder 20,the present invention can be applied to any packet communication as faras under such conditions that a beginning data word of a packet has afixed value to be used in synchronous generation at the time ofinterleaving or de-interleaving in units of a packet and the packet hasa fixed length.

Furthermore, although in the above-mentioned mode, a Reed-Solomon codehas been used as the error correction code, the present invention can beapplied to encoding and decoding by use of an arbitrary error correctioncode.

Further, although the above mode has been described with reference to anexample where an error is corrected mainly when a packet loss hasoccurred, of course the present invention can be applied to the case ofpacket loss occurrence but also to the case where a significant bursterror has occurred. Note here that of course the present inventionenables an ordinary burst error and a random error to be corrected byperforming processing similar to the conventional processing.

Furthermore, although the above mode has been described with referenceto a data transmission/reception system provided with the encoder 10 forencoding packeted data and the decoder 20 for decoding data encoded bythis encoder 10, the present invention can be applied not only to suchencoder and decoder but also to any use where interleaving andde-interleaving are performed.

Of course, the present invention can thus be modified as far as it doesnot depart from its gist.

INDUSTRIAL APPLICABILITY

As described above, an interleaving device, interleaving method, ade-interleaving device, and de-interleaving method related to thepresent invention are useful to enable a significant burst errorcontaining a packet loss by using an error correction code with a smallcode length when performing packet communication and well applicable toreal-time communication etc., which. re-transmission of packet is notpermitted, such as streaming reproduction of a video signal and/or anaudio signal.

1. An interleaving device comprising: a first interleaving means forperforming folding interleaving on first data comprised of plural inputpackets, in units of a data word or plural consecutive data words; and asecond interleaving means for performing interleaving on second datacomprised of plural packets generated by said first interleaving means,in units of the packet.
 2. The interleaving device according to claim 1,wherein said second interleaving means replaces a value of beginningdata in a first packet of packet-unit interleave.
 3. The interleavingdevice according to claim 2, wherein said beginning data is a sink bytein a header of a packet that constitutes said first data.
 4. Theinterleaving device according to claim 1, wherein said firstinterleaving means is installed by using first storage meansincorporated in a programmable device; and wherein said secondinterleaving means is installed by using second storage means externallyattached to said programmable device.
 5. The interleaving deviceaccording to claim 4, wherein said first storage means is a dual-portrandom access memory in which inconsecutive addresses are accessed inunits of a data word at each clock synchronized with the data word. 6.The interleaving device according to claim 4, wherein said secondstorage means is a random access memory fitted to burst transfer of datain units of plural data words.
 7. The interleaving device according toclaim 6, wherein said second storage means is a synchronous dynamicrandom access memory.
 8. The interleaving device according to claim 1,wherein an error correction code is added to each of the packets thatconstitute said first data.
 9. The interleaving device according toclaim 8, wherein each of the packets that constitute said first data isobtained by adding said error correction code to plural transportpackets, respectively, that constitute a transport stream obtained byperforming compression and encoding on the basis of the MPEG-2 standardon predetermined data.
 10. The interleaving device according to claim 8,wherein said error correction code is a Reed-Solomon code.
 11. Theinterleaving device according to claim 1, wherein said firstinterleaving means performs folding interleaving on said first data inunits of a byte or plural consecutive bytes.
 12. An interleaving methodcomprising: a first interleaving step of performing folding interleavingon first data comprised of plural input packets, in units of a data wordor plural consecutive data words; and a second interleaving step ofperforming interleaving, in units of a packet, on second data comprisedof plural packets generated by the first interleaving step.
 13. Theinterleaving method according to claim 12, wherein in said secondinterleaving step, a value of beginning data in a first packet ofpacket-unit interleave is replaced.
 14. The interleaving methodaccording to claim 13, wherein said beginning data is a sink byte in aheader of a packet that constitutes said first data.
 15. Theinterleaving method according to claim 12, wherein said firstinterleaving step is performed by using first storage means which isincorporated in a programmable device; and wherein said secondinterleaving step is performed by using second storage means which isexternally attached to the programmable device.
 16. The interleavingmethod according to claim 15, wherein as said first storage means, adual-port random access memory in which inconsecutive addresses areaccessed in units of a data word at each clock synchronized with thedata word is used.
 17. The interleaving method according to claim 15,wherein as said second storage means, a random access memory fitted toburst transfer of data in units of plural data words is used.
 18. Theinterleaving method according to claim 17, wherein as said secondstorage means, a synchronous dynamic random access memory is used. 19.The interleaving method according to claim 12, wherein an errorcorrection code is added to each of the packets that constitute saidfirst data.
 20. The interleaving method according to claim 19, whereineach of the packets that constitute said first data is obtained byadding said error correction code to each of plural transport packetsthat constitute a transport stream obtained by performing compressionand encoding on the basis of the MPEG-2 standard on predetermined data.21. The interleaving method according to claim 19, wherein said errorcorrection code is a Reed-Solomon code.
 22. The interleaving methodaccording to claim 12, wherein in said first interleaving step, foldinginterleaving is performed on said first data in units of a byte orplural consecutive bytes.
 23. A de-interleaving device comprising: afirst de-interleaving means for performing de-interleaving, in units ofa packet, on third data comprised of plural input packets, in such amanner as to restore an order of packets of data generated by performingfirst interleaving, which is folding interleaving, on first datacomprised of plural input packets in units of a data word or pluralconsecutive data words and performing second interleaving in units of apacket on second data comprised of plural packets generated by saidfirst interleaving to an order of the packets that constitute the seconddata; and second de-interleaving means for performing foldingde-interleaving, in units of a data word or plural consecutive datawords, on fourth data comprised of plural packets generated by saidfirst de-interleaving means, in such a manner as to restore an order ofthe packets that constitute said second data to an order of the packetsthat constitute said first data.
 24. The de-interleaving deviceaccording to claim 23, wherein a value of beginning data in a firstpacket in packet-unit interleave is replaced according to said secondinterleaving; and wherein said first de-interleaving means synchronizesa first packet in said third data on the basis of the beginning datawhose value is replaced according to said second interleaving.
 25. Thede-interleaving device according to claim 24, wherein said beginningdata is a sink byte in a header of a packet that constitutes said firstdata.
 26. The de-interleaving device according to claim 24, wherein saidfirst de-interleaving means restores a replaced value of said beginningdata to an original value, to generate said fourth data.
 27. Thede-interleaving device according to claim 23, wherein said firstde-interleaving means knows whether a packet is lost on the basis ofinformation indicating consecutiveness of packets that constitute saidthird data.
 28. The de-interleaving device according to claim 27,wherein said first de-interleaving means, when having known that apacket is lost, replaces data that corresponds to the lost packet withinvalid data, to generate said fourth data.
 29. The de-interleavingdevice according to claim 23, wherein said first de-interleaving meansis installed by using first storage means which is externally attachedto a programmable device; and wherein said second de-interleaving meansis installed by using second storage means which is incorporated in theprogrammable device.
 30. The de-interleaving device according to claim29, wherein said first storage means is a random access memory that isfitted to burst transfer of data in units of plural data words.
 31. Thede-interleaving device according to claim 30, wherein said first storagemeans is a synchronous dynamic random access memory.
 32. Thede-interleaving device according to claim 29, wherein said secondstorage means is a dual-port random access memory in which inconsecutiveaddresses are accessed in units of a data word at each clocksynchronized with the data word.
 33. The de-interleaving deviceaccording to claim 23, wherein a predetermined error correction code isadded to each of the packets that constitute said first data.
 34. Thede-interleaving device according to claim 33, wherein each of thepackets that constitute said first data is obtained by adding said errorcorrection code to plural transport packets, respectively, thatconstitute a transport stream obtained by performing compression andencoding on the basis of the MPEG-2 standard on predetermined data. 35.The de-interleaving device according to claim 33, wherein said errorcorrection code is a Reed-Solomon code.
 36. The de-interleaving deviceaccording to claim 23, wherein said first interleaving is foldingde-interleaving which is performed in units of a byte or pluralconsecutive bytes; and wherein said second de-interleaving is foldingde-interleaving which is performed in units of a byte or pluralconsecutive bytes.
 37. A de-interleaving method comprising: a firstde-interleaving step of performing de-interleaving, in units of apacket, on third data comprised of plural input packets, in such amanner as to restore an order of packets of data generated by performingfirst interleaving, which is folding interleaving, on first datacomprised of plural input packets in units of a data word or pluralconsecutive data words and performing second interleaving in units of apacket on second data comprised of plural packets generated by saidfirst interleaving to an order of the packets that constitute saidsecond data; and a second de-interleaving step of performing foldingde-interleaving, in units of a data word or plural consecutive datawords, on fourth data comprised of plural packets generated in saidfirst de-interleaving step, in such a manner as to restore an order ofthe packets that constitute said second data to an order of the packetsthat constitute said first data.
 38. The de-interleaving methodaccording to claim 37, wherein a value of beginning data in a firstpacket in packet-unit interleave is replaced according to said secondinterleaving; and wherein in said first de-interleaving step, a firstpacket in said third data is synchronized on the basis of the beginningdata whose value is replaced in said second interleaving step.
 39. Thede-interleaving method according to claim 38, wherein said beginningdata is a sink byte in a header of a packet that constitutes said firstdata.
 40. The de-interleaving method according to claim 38, wherein insaid first de-interleaving step, a replaced value of said beginning datais restored to an original value, to generate said fourth data.
 41. Thede-interleaving method according to claim 37, wherein in said firstde-interleaving step, whether a packet is lost is known on the basis ofinformation indicating consecutiveness of packets that constitute saidthird data.
 42. The de-interleaving method according to claim 41,wherein in said first de-interleaving step, when having known that apacket is lost, data corresponding to the lost packet is replaced withinvalid data, to generate said fourth data.
 43. The de-interleavingmethod according to claim 37, wherein said first de-interleaving step isperformed by using first storage means which is externally attached to aprogrammable device; and wherein said second de-interleaving step isperformed by using second storage means which is incorporated in saidprogrammable device.
 44. The de-interleaving method according to claim43, wherein as said first storage means, a random access memory fittedto burst transfer of data in units of plural data words is used.
 45. Thede-interleaving method according to claim 44, wherein as said firststorage means, a synchronous dynamic random access memory is used. 46.The de-interleaving method according to claim 43, wherein as said secondstorage means, a dual-port random access memory in which inconsecutiveaddresses are accessed in units of a data word at each clocksynchronized with the data word is used.
 47. The de-interleaving methodaccording to claim 37, wherein a predetermined error correction code isadded to each of the packets that constitute said first data.
 48. Thede-interleaving method according to claim 47, wherein each of thepackets that constitute said first data is obtained by adding said errorcorrection code to plural transport packets, respectively, thatconstitute a transport stream obtained by performing compression andencoding on the basis of the MPEG-2 standard on predetermined data. 49.The de-interleaving method according to claim 47, wherein the errorcorrection code is a Reed-Solomon code.
 50. The de-interleaving methodaccording to claim 37, wherein said first interleaving is foldingde-interleaving which is performed in units of a byte or pluralconsecutive bytes; and wherein said second de-interleaving is foldingde-interleaving which is performed in units of a byte or pluralconsecutive bytes.